diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2012-12-26 02:15:05 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-01-25 00:15:23 +0400 |
commit | bea22e396766ff09ca43e6ddc143b0f1dd6c08bd (patch) | |
tree | e00f4cbc6ed0542fef8f3d8201a6b00854b437ec /accel-pppd/CMakeLists.txt | |
parent | afdce0b1537264067f7cbb2b0adb63b20dc5d9e7 (diff) | |
download | accel-ppp-bea22e396766ff09ca43e6ddc143b0f1dd6c08bd.tar.gz accel-ppp-bea22e396766ff09ca43e6ddc143b0f1dd6c08bd.zip |
cmake: use CMAKE_FIND_ROOT_PATH and LIB_SUFFIX
Diffstat (limited to 'accel-pppd/CMakeLists.txt')
-rw-r--r-- | accel-pppd/CMakeLists.txt | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/accel-pppd/CMakeLists.txt b/accel-pppd/CMakeLists.txt index f7fbdd7..79bf3f3 100644 --- a/accel-pppd/CMakeLists.txt +++ b/accel-pppd/CMakeLists.txt @@ -15,6 +15,19 @@ ENDIF (EXISTS ${CMAKE_HOME_DIRECTORY}/.git AND NOT DEFINED IGNORE_GIT) ADD_DEFINITIONS(-DACCEL_PPP_VERSION="${ACCEL_PPP_VERSION}") +IF (NOT DEFINED LIB_SUFFIX) + EXECUTE_PROCESS( + COMMAND uname -m + COMMAND tr -d '\n' + OUTPUT_VARIABLE ARCH + ) + message(STATUS "'" ${ARCH} "'") + IF (ARCH STREQUAL x86_64) + SET(LIB_SUFFIX 64) + ENDIF (ARCH STREQUAL x86_64) +ENDIF (NOT DEFINED LIB_SUFFIX) + + INCLUDE_DIRECTORIES(include) IF (MEMDEBUG) @@ -110,7 +123,7 @@ TARGET_LINK_LIBRARIES(accel-pppd triton rt pthread ${crypto_lib} pcre) set_property(TARGET accel-pppd PROPERTY CMAKE_SKIP_BUILD_RPATH FALSE) set_property(TARGET accel-pppd PROPERTY CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) set_property(TARGET accel-pppd PROPERTY INSTALL_RPATH_USE_LINK_PATH FALSE) -set_property(TARGET accel-pppd PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib/accel-ppp) +set_property(TARGET accel-pppd PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib${LIB_SIFFIX}/accel-ppp) INSTALL(TARGETS accel-pppd RUNTIME DESTINATION sbin |