summaryrefslogtreecommitdiff
path: root/accel-pppd/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/CMakeLists.txt')
-rw-r--r--accel-pppd/CMakeLists.txt23
1 files changed, 18 insertions, 5 deletions
diff --git a/accel-pppd/CMakeLists.txt b/accel-pppd/CMakeLists.txt
index 0c1c9496..2d1db497 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)
@@ -93,7 +106,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
@@ -102,10 +115,10 @@ INSTALL(TARGETS accel-pppd
INSTALL(FILES accel-ppp.conf.5 DESTINATION share/man/man5)
IF (NOT DEFINED CPACK_TYPE)
- INSTALL(FILES accel-ppp.conf DESTINATION /etc RENAME accel-ppp.conf.dist)
+ INSTALL(FILES accel-ppp.conf DESTINATION ${CMAKE_FIND_ROOT_PATH}/etc RENAME accel-ppp.conf.dist)
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND mkdir -p /var/log/accel-ppp)")
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND mkdir -p /var/run/accel-ppp)")
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND 'echo 0 > /var/run/accel-ppp/seq')")
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND mkdir -p ${CMAKE_FIND_ROOT_PATH}/var/log/accel-ppp)")
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND mkdir -p ${CMAKE_FIND_ROOT_PATH}/var/run/accel-ppp)")
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND 'echo 0 > ${CMAKE_FIND_ROOT_PATH}/var/run/accel-ppp/seq')")
ENDIF (NOT DEFINED CPACK_TYPE)