Cmake build: Enable to install also a debug version

This commit is contained in:
Kornel Benko 2013-01-26 11:29:48 +01:00
parent 3fb94ca4e6
commit 28f5fcd56b

View File

@ -129,15 +129,15 @@ endif()
# Check option dependencies
if(LYX_CPACK)
set(LYX_INSTALL ON)
endif()
if(LYX_DMG)
set(LYX_BUNDLE ON)
set(LYX_CPACK ON)
endif()
if(LYX_CPACK)
set(LYX_INSTALL ON)
endif()
if(LYX_INSTALL)
set(LYX_NLS ON)
if (WIN32)
@ -149,7 +149,9 @@ if(LYX_INSTALL)
set(LYX_CONSOLE OFF)
endif()
set(LYX_PACKAGE_SUFFIX ON)
set(LYX_RELEASE ON)
if(NOT LYX_DEBUG)
set(LYX_RELEASE ON)
endif()
set(LYX_PROFILE OFF)
endif()
@ -237,12 +239,16 @@ else()
set(USE_POSIX_PACKAGING ON)
endif()
macro(setstripped _varname _value)
string(STRIP ${_value} _v)
if(USE_POSIX_PACKAGING)
string(TOLOWER ${_v} ${_varname})
macro(setstripped _varname)
if(${ARGC} GREATER 1)
string(STRIP "${ARGV1}" _v)
if(USE_POSIX_PACKAGING)
string(TOLOWER ${_v} ${_varname})
else()
set(${_varname} ${_v})
endif()
else()
set(${_varname} ${_v})
set(${_varname})
endif()
endmacro(setstripped)
@ -448,7 +454,7 @@ if(NOT MSVC)
set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -D_GLIBCPP_CONCEPT_CHECKS")
endif()
set(CMAKE_CXX_FLAGS "${LYX_CXX_FLAGS} -fno-strict-aliasing " CACHE TYPE STRING FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "${LYX_CXX_FLAGS} -fno-strict-aliasing -O0 -g -D_DEBUG" CACHE TYPE STRING FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "${LYX_CXX_FLAGS} -fno-strict-aliasing -O0 -g3 -D_DEBUG" CACHE TYPE STRING FORCE)
if(MINGW)
set(CMAKE_CXX_FLAGS_RELEASE "${LYX_CXX_FLAGS} -O2 -DNDEBUG" CACHE TYPE STRING FORCE)
else()