diff --git a/development/cmake/CMakeLists.txt b/development/cmake/CMakeLists.txt index 62f510a90c..37e7a90d50 100644 --- a/development/cmake/CMakeLists.txt +++ b/development/cmake/CMakeLists.txt @@ -27,9 +27,10 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) option(lyxinstall "Build install projects/rules" ON) -if(UNIX) +if(UNIX OR MINGW) execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) - if(GCC_VERSION VERSION_GREATER 4.4) + message(STATUS "Using GCC version ${GCC_VERSION}") + if(NOT GCC_VERSION VERSION_LESS 4.4) set(LYX_USE_TR1 1) # GCC <= 4.5 does not support regex: there are linker errors # http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.tr1 @@ -101,6 +102,7 @@ else() set(PROGRAM_SUFFIX "") endif() + if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) # see http://www.cmake.org/pipermail/cmake/2006-October/011559.html if (UNIX)