diff --git a/development/cmake/CMakeLists.txt b/development/cmake/CMakeLists.txt index a6827418ca..733051b486 100644 --- a/development/cmake/CMakeLists.txt +++ b/development/cmake/CMakeLists.txt @@ -23,8 +23,6 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules") include(LyXMacros) -message(STATUS) -message(STATUS "Switch LYX_* variables by -DLYX_*=1 or 0:") # Usage LYX_OPTION # 1. parameter: option name without prefix 'LYX_' @@ -34,7 +32,27 @@ message(STATUS "Switch LYX_* variables by -DLYX_*=1 or 0:") message(STATUS) message(STATUS "Switch LYX_* variables by -DLYX_*=1 or 0:") message(STATUS) + LYX_OPTION(CPACK "Use the CPack management (Implies LYX_INSTALL option)" OFF ALL) +if(LYX_CPACK) + set(LYX_INSTALL ON CACHE BOOL "INSTALL option" FORCE) +endif() + +LYX_OPTION(INSTALL "Build install projects/rules (implies a bunch of other options)" OFF ALL) +if(LYX_INSTALL) + set(LYX_NLS ON CACHE BOOL "Nls option" FORCE) + set(LYX_ASPELL ON CACHE BOOL "Aspell option" FORCE) + set(LYX_AIKSAURUS ON CACHE BOOL "Aiksaurus option" FORCE) + if (WIN32) + set(LYX_HUNSPELL ON CACHE BOOL "Hunspell option" FORCE) + endif() + set(LYX_NO_CONSOLE ON CACHE BOOL "No console option" FORCE) + set(LYX_PACKAGE_SUFFIX ON CACHE BOOL "Package suffix option" FORCE) + set(LYX_RELEASE ON CACHE BOOL "Release option" FORCE) + set(LYX_DEBUG OFF CACHE BOOL "Debug option" FORCE) + set(LYX_PROFILE OFF CACHE BOOL "Profile option" FORCE) +endif() + LYX_OPTION(NLS "Use nls" OFF ALL) LYX_OPTION(ASPELL "Require aspell" OFF ALL) LYX_OPTION(AIKSAURUS "Require Aiksaurus" OFF ALL) @@ -45,7 +63,6 @@ LYX_OPTION(RELEASE "Build release version" ON ALL) LYX_OPTION(PROFILE "Build profile version" OFF GCC) LYX_OPTION(USE_EXTERNAL_BOOST "Use external boost" OFF GCC) LYX_OPTION(USE_EXTERNAL_LIBINTL "Use external libintl" ON ALL) -LYX_OPTION(INSTALL "Build install projects/rules (implies a bunch of other options)" OFF ALL) LYX_OPTION(PACKAGE_SUFFIX "Use version suffix for packaging" ON ALL) LYX_OPTION(PROGRAM_SUFFIX "Append version suffix to binaries" ON GCC) LYX_OPTION(NO_CONSOLE "Suppress console on Windows" OFF MSVC) @@ -62,22 +79,7 @@ LYX_OPTION(SHARED_LIBRARIES "Build shared libraries" OFF ALL) message(STATUS) -if(LYX_CPACK) - set(LYX_INSTALL ON CACHE BOOL "INSTALL option" FORCE) -endif() -if(LYX_INSTALL) - set(LYX_NLS ON CACHE BOOL "Nls option" FORCE) - set(LYX_ASPELL ON CACHE BOOL "Aspell option" FORCE) - set(LYX_AIKSAURUS ON CACHE BOOL "Aiksaurus option" FORCE) - if (WIN32) - set(LYX_HUNSPELL ON CACHE BOOL "Hunspell option" FORCE) - endif() - set(LYX_NO_CONSOLE ON CACHE BOOL "No console option" FORCE) - set(LYX_PACKAGE_SUFFIX ON CACHE BOOL "Package suffix option" FORCE) - set(LYX_RELEASE ON CACHE BOOL "Release option" FORCE) - set(LYX_DEBUG OFF CACHE BOOL "Debug option" FORCE) - set(LYX_PROFILE OFF CACHE BOOL "Profile option" FORCE) -endif() + set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)