I'm trying to get cmake to build on a MSYS/Mingw system.   "MSYS Makefiles"
generator is used, causing "MSYS" variable to be accessible at the end of
CMakeMSYSFindMake.   Library and include searches into the default
locations do not work because it is presumed -in the scripts that
/usr/local will point somewhere, in fact in MSYS, /usr is (very softly)
"mounted" and file lookups from cmake are mostly unsuccessful (somehow
LDFLAGS and CFLAGS get translated to absolute paths, though).

As it is, cmake on windows doesn't get the "mounting" of /usr and so I try
to substitute the path, using the pre-existing variable
CMAKE_SYSTEM_PREFIX_PATH;  MINGW is in effect and WIN32 also, but we want
to be in MSYS.  From the msys .dll file  (required to be in the $PATH
environment) I find the directory holding now "msys.bat" which then
(/mingw/msys/1.0) i can take as effectively /usr, insert this into the
CMAKE_SYSTEM_PREFIX_PATH variable.
Here is the traced output from the beginning of the test project.
  I wanted to run this by with this expert audience to check if my approach
is correct.
   My big qualm is that I've hijacked a variable but I don't know a way to
make another global variable name with scripts;
it is puzzling that, when I message the path-lists I created in
Platforms/MSYSpaths.cmake, from the
CMakeLists.txt, the semi-colons have disappeared (although variable watch
indicates nothing wants to change them),

C:/MinGW/msys/1.0/home/test/CMakeLists.txt(22):
 cmake_minimum_required(VERSION 2.8 )
C:/MinGW/msys/1.0/home/test/CMakeLists.txt(24):  message( CMAKE_HOST_WIN32
${CMAKE_HOST_WIN32} MSYS? ${MSYS}  )
 CMAKE_HOST_WIN32 1 MSYS?
C:/MinGW/msys/1.0/home/test/CMakeLists.txt(25):  project(test_test C )
C:/MinGW/share/cmake-2.8/Modules/CMakeMSYSFindMake.cmake(17):
 set(CMAKE_HOST_UNIX 1 )
C:/MinGW/share/cmake-2.8/Modules/CMakeMSYSFindMake.cmake(19):
 find_program(CMAKE_MAKE_PROGRAM make )
C:/MinGW/share/cmake-2.8/Modules/CMakeMSYSFindMake.cmake(20):
 mark_as_advanced(CMAKE_MAKE_PROGRAM )
C:/MinGW/share/cmake-2.8/Modules/CMakeMSYSFindMake.cmake(22):
 message(CMAKE_MAKE_PROGRAM: ${CMAKE_MAKE_PROGRAM} )
CMAKE_MAKE_PROGRAM: C:/MinGW/msys/1.0/bin/make.exe
C:/MinGW/share/cmake-2.8/Modules/CMakeMSYSFindMake.cmake(23):
 find_path(_USR_PATH msys-1.0.dll ENV PATH NO_DEFAULT_PATH )
C:/MinGW/share/cmake-2.8/Modules/CMakeMSYSFindMake.cmake(27):
 find_path(CMAKE_USR_PATH msys.bat PATH ${_USR_PATH}/../ NO_DEFAULT_PATH )
C:/MinGW/share/cmake-2.8/Modules/CMakeMSYSFindMake.cmake(31):
 unset(CMAKE_SYSTEM_PREFIX_PATH )
C:/MinGW/share/cmake-2.8/Modules/CMakeMSYSFindMake.cmake(32):
 set(CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_USR_PATH}/local;${CMAKE_USR_PATH} )
C:/MinGW/share/cmake-2.8/Modules/CMakeMSYSFindMake.cmake(33):  message(
CMAKE_SYSTEM_PREFIX_PATH = ${CMAKE_SYSTEM_PREFIX_PATH} <MSYSfindmake> )
 CMAKE_SYSTEM_PREFIX_PATH = C:/MinGW/msys/1.0/local;C:/MinGW/msys/1.0
<MSYSfindmake>
C:/MinGW/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(47):  message(
CMAKE_HOST_WIN32 ${CMAKE_HOST_WIN32} MSYS? ${MSYS}  )
 CMAKE_HOST_WIN32 1 MSYS? 1
C:/MinGW/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(48):
 if(CMAKE_HOST_UNIX )
C:/MinGW/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(49):
 find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
C:/MinGW/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(50):
 if(CMAKE_UNAME )
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to