mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-19 21:56:13 +00:00
Changed: Don't check Debian environment variables in CMake scripts (define options on cmake command-line instead)
This commit is contained in:
parent
bedd0f3c52
commit
757e538b7f
1 changed files with 2 additions and 27 deletions
|
@ -13,11 +13,7 @@ ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||||
MACRO(NL_GEN_PC name)
|
MACRO(NL_GEN_PC name)
|
||||||
IF(NOT WIN32 AND WITH_INSTALL_LIBRARIES)
|
IF(NOT WIN32 AND WITH_INSTALL_LIBRARIES)
|
||||||
CONFIGURE_FILE(${name}.in "${CMAKE_CURRENT_BINARY_DIR}/${name}")
|
CONFIGURE_FILE(${name}.in "${CMAKE_CURRENT_BINARY_DIR}/${name}")
|
||||||
IF(CMAKE_LIBRARY_ARCHITECTURE)
|
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}" DESTINATION ${NL_LIB_PREFIX}/pkgconfig)
|
||||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}" DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig)
|
|
||||||
ELSE(CMAKE_LIBRARY_ARCHITECTURE)
|
|
||||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/${name}" DESTINATION lib/pkgconfig)
|
|
||||||
ENDIF(CMAKE_LIBRARY_ARCHITECTURE)
|
|
||||||
ENDIF(NOT WIN32 AND WITH_INSTALL_LIBRARIES)
|
ENDIF(NOT WIN32 AND WITH_INSTALL_LIBRARIES)
|
||||||
ENDMACRO(NL_GEN_PC)
|
ENDMACRO(NL_GEN_PC)
|
||||||
|
|
||||||
|
@ -250,16 +246,7 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
|
||||||
###
|
###
|
||||||
# Optional support
|
# Optional support
|
||||||
###
|
###
|
||||||
|
OPTION(WITH_SYMBOLS "Keep debug symbols in binaries" OFF)
|
||||||
# Check if CMake is launched from a Debian packaging script
|
|
||||||
SET(DEB_HOST_GNU_CPU $ENV{DEB_HOST_GNU_CPU})
|
|
||||||
|
|
||||||
# Don't strip if generating a .deb
|
|
||||||
IF(DEB_HOST_GNU_CPU)
|
|
||||||
OPTION(WITH_SYMBOLS "Keep debug symbols in binaries" ON )
|
|
||||||
ELSE(DEB_HOST_GNU_CPU)
|
|
||||||
OPTION(WITH_SYMBOLS "Keep debug symbols in binaries" OFF)
|
|
||||||
ENDIF(DEB_HOST_GNU_CPU)
|
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
OPTION(WITH_STLPORT "With STLport support." ON )
|
OPTION(WITH_STLPORT "With STLport support." ON )
|
||||||
|
@ -371,9 +358,6 @@ MACRO(NL_SETUP_BUILD)
|
||||||
ENDIF(HOST_CPU MATCHES "amd64")
|
ENDIF(HOST_CPU MATCHES "amd64")
|
||||||
|
|
||||||
# Determine target CPU
|
# Determine target CPU
|
||||||
IF(NOT TARGET_CPU)
|
|
||||||
SET(TARGET_CPU $ENV{DEB_HOST_GNU_CPU})
|
|
||||||
ENDIF(NOT TARGET_CPU)
|
|
||||||
|
|
||||||
# If not specified, use the same CPU as host
|
# If not specified, use the same CPU as host
|
||||||
IF(NOT TARGET_CPU)
|
IF(NOT TARGET_CPU)
|
||||||
|
@ -386,9 +370,6 @@ MACRO(NL_SETUP_BUILD)
|
||||||
SET(TARGET_CPU "x86")
|
SET(TARGET_CPU "x86")
|
||||||
ENDIF(TARGET_CPU MATCHES "amd64")
|
ENDIF(TARGET_CPU MATCHES "amd64")
|
||||||
|
|
||||||
# DEB_HOST_ARCH_ENDIAN is 'little' or 'big'
|
|
||||||
# DEB_HOST_ARCH_BITS is '32' or '64'
|
|
||||||
|
|
||||||
IF(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
IF(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||||
SET(CLANG ON)
|
SET(CLANG ON)
|
||||||
MESSAGE(STATUS "Using Clang compiler")
|
MESSAGE(STATUS "Using Clang compiler")
|
||||||
|
@ -449,12 +430,6 @@ MACRO(NL_SETUP_BUILD)
|
||||||
ENDIF(TARGET_CPU STREQUAL "x86_64")
|
ENDIF(TARGET_CPU STREQUAL "x86_64")
|
||||||
|
|
||||||
# Fix library paths suffixes for Debian MultiArch
|
# Fix library paths suffixes for Debian MultiArch
|
||||||
SET(DEBIAN_MULTIARCH $ENV{DEB_HOST_MULTIARCH})
|
|
||||||
|
|
||||||
IF(DEBIAN_MULTIARCH)
|
|
||||||
SET(CMAKE_LIBRARY_ARCHITECTURE ${DEBIAN_MULTIARCH})
|
|
||||||
ENDIF(DEBIAN_MULTIARCH)
|
|
||||||
|
|
||||||
IF(CMAKE_LIBRARY_ARCHITECTURE)
|
IF(CMAKE_LIBRARY_ARCHITECTURE)
|
||||||
SET(CMAKE_LIBRARY_PATH /lib/${CMAKE_LIBRARY_ARCHITECTURE} /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_PATH})
|
SET(CMAKE_LIBRARY_PATH /lib/${CMAKE_LIBRARY_ARCHITECTURE} /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_PATH})
|
||||||
IF(TARGET_X64)
|
IF(TARGET_X64)
|
||||||
|
|
Loading…
Reference in a new issue