summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2012-12-26 02:15:05 +0400
committerKozlov Dmitry <xeb@mail.ru>2013-01-25 00:15:23 +0400
commitbea22e396766ff09ca43e6ddc143b0f1dd6c08bd (patch)
treee00f4cbc6ed0542fef8f3d8201a6b00854b437ec /accel-pppd
parentafdce0b1537264067f7cbb2b0adb63b20dc5d9e7 (diff)
downloadaccel-ppp-bea22e396766ff09ca43e6ddc143b0f1dd6c08bd.tar.gz
accel-ppp-bea22e396766ff09ca43e6ddc143b0f1dd6c08bd.zip
cmake: use CMAKE_FIND_ROOT_PATH and LIB_SUFFIX
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/CMakeLists.txt15
-rw-r--r--accel-pppd/auth/CMakeLists.txt2
-rw-r--r--accel-pppd/ctrl/l2tp/CMakeLists.txt2
-rw-r--r--accel-pppd/ctrl/pppoe/CMakeLists.txt6
-rw-r--r--accel-pppd/ctrl/pptp/CMakeLists.txt2
-rw-r--r--accel-pppd/extra/CMakeLists.txt5
-rw-r--r--accel-pppd/extra/net-snmp/CMakeLists.txt2
-rw-r--r--accel-pppd/ipv6/CMakeLists.txt2
-rw-r--r--accel-pppd/logs/CMakeLists.txt8
-rw-r--r--accel-pppd/radius/CMakeLists.txt2
-rw-r--r--accel-pppd/shaper/CMakeLists.txt2
-rw-r--r--accel-pppd/triton/CMakeLists.txt4
12 files changed, 30 insertions, 22 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
diff --git a/accel-pppd/auth/CMakeLists.txt b/accel-pppd/auth/CMakeLists.txt
index 7af8fac..f93d9e3 100644
--- a/accel-pppd/auth/CMakeLists.txt
+++ b/accel-pppd/auth/CMakeLists.txt
@@ -8,6 +8,6 @@ TARGET_LINK_LIBRARIES(auth_mschap_v1 ${crypto_lib})
TARGET_LINK_LIBRARIES(auth_mschap_v2 ${crypto_lib})
INSTALL(TARGETS auth_pap auth_chap_md5 auth_mschap_v1 auth_mschap_v2
- LIBRARY DESTINATION lib/accel-ppp
+ LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
)
diff --git a/accel-pppd/ctrl/l2tp/CMakeLists.txt b/accel-pppd/ctrl/l2tp/CMakeLists.txt
index b295289..66dd3fc 100644
--- a/accel-pppd/ctrl/l2tp/CMakeLists.txt
+++ b/accel-pppd/ctrl/l2tp/CMakeLists.txt
@@ -10,7 +10,7 @@ ADD_LIBRARY(l2tp SHARED
)
#TARGET_LINK_LIBRARIES(l2tp nl nl-genl)
-INSTALL(TARGETS l2tp LIBRARY DESTINATION lib/accel-ppp)
+INSTALL(TARGETS l2tp LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp)
FILE(GLOB dict "${CMAKE_CURRENT_SOURCE_DIR}/dict/*")
INSTALL(FILES ${dict} DESTINATION share/accel-ppp/l2tp)
diff --git a/accel-pppd/ctrl/pppoe/CMakeLists.txt b/accel-pppd/ctrl/pppoe/CMakeLists.txt
index a38cfb2..fad9efd 100644
--- a/accel-pppd/ctrl/pppoe/CMakeLists.txt
+++ b/accel-pppd/ctrl/pppoe/CMakeLists.txt
@@ -13,9 +13,5 @@ ENDIF(RADIUS)
ADD_LIBRARY(pppoe SHARED ${sources})
TARGET_LINK_LIBRARIES(pppoe ${crypto_lib})
-#set_property(TARGET pppoe PROPERTY CMAKE_SKIP_BUILD_RPATH FALSE)
-#set_property(TARGET pppoe PROPERTY CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-#set_property(TARGET pppoe PROPERTY INSTALL_RPATH_USE_LINK_PATH FALSE)
-#set_property(TARGET pppoe PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib/accel-ppp)
-INSTALL(TARGETS pppoe LIBRARY DESTINATION lib/accel-ppp)
+INSTALL(TARGETS pppoe LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp)
diff --git a/accel-pppd/ctrl/pptp/CMakeLists.txt b/accel-pppd/ctrl/pptp/CMakeLists.txt
index 3199e7f..aa011d1 100644
--- a/accel-pppd/ctrl/pptp/CMakeLists.txt
+++ b/accel-pppd/ctrl/pptp/CMakeLists.txt
@@ -2,4 +2,4 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
ADD_LIBRARY(pptp SHARED pptp.c)
-INSTALL(TARGETS pptp LIBRARY DESTINATION lib/accel-ppp )
+INSTALL(TARGETS pptp LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp )
diff --git a/accel-pppd/extra/CMakeLists.txt b/accel-pppd/extra/CMakeLists.txt
index d3d48ea..6badcd5 100644
--- a/accel-pppd/extra/CMakeLists.txt
+++ b/accel-pppd/extra/CMakeLists.txt
@@ -1,7 +1,7 @@
ADD_LIBRARY(sigchld SHARED sigchld.c)
ADD_LIBRARY(pppd_compat SHARED pppd_compat.c)
TARGET_LINK_LIBRARIES(pppd_compat sigchld)
-set_property(TARGET pppd_compat PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib/accel-ppp)
+set_property(TARGET pppd_compat PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/accel-ppp)
ADD_LIBRARY(ippool SHARED ippool.c)
ADD_LIBRARY(ipv6pool SHARED ipv6pool.c)
ADD_LIBRARY(chap-secrets SHARED chap-secrets.c)
@@ -10,10 +10,9 @@ TARGET_LINK_LIBRARIES(logwtmp util)
ADD_LIBRARY(connlimit SHARED connlimit.c)
INSTALL(TARGETS pppd_compat ippool ipv6pool sigchld chap-secrets logwtmp connlimit
- LIBRARY DESTINATION lib/accel-ppp
+ LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
)
-
IF (NETSNMP)
ADD_SUBDIRECTORY(net-snmp)
ENDIF (NETSNMP)
diff --git a/accel-pppd/extra/net-snmp/CMakeLists.txt b/accel-pppd/extra/net-snmp/CMakeLists.txt
index b61c0d0..7633f37 100644
--- a/accel-pppd/extra/net-snmp/CMakeLists.txt
+++ b/accel-pppd/extra/net-snmp/CMakeLists.txt
@@ -25,5 +25,5 @@ IF (NETSNMP_PREFIX)
ENDIF (NETSNMP_PREFIX)
INSTALL(TARGETS net-snmp
- LIBRARY DESTINATION lib/accel-ppp
+ LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
)
diff --git a/accel-pppd/ipv6/CMakeLists.txt b/accel-pppd/ipv6/CMakeLists.txt
index 9f8c3d1..e95eadb 100644
--- a/accel-pppd/ipv6/CMakeLists.txt
+++ b/accel-pppd/ipv6/CMakeLists.txt
@@ -2,6 +2,6 @@ ADD_LIBRARY(ipv6_dhcp SHARED dhcpv6.c dhcpv6_packet.c)
ADD_LIBRARY(ipv6_nd SHARED nd.c)
INSTALL(TARGETS ipv6_dhcp ipv6_nd
- LIBRARY DESTINATION lib/accel-ppp
+ LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
)
diff --git a/accel-pppd/logs/CMakeLists.txt b/accel-pppd/logs/CMakeLists.txt
index b10163f..b25cbe2 100644
--- a/accel-pppd/logs/CMakeLists.txt
+++ b/accel-pppd/logs/CMakeLists.txt
@@ -15,21 +15,21 @@ IF(LOG_FILE)
ADD_LIBRARY(log_file SHARED log_file.c)
TARGET_LINK_LIBRARIES(log_file rt)
INSTALL(TARGETS log_file
- LIBRARY DESTINATION lib/accel-ppp
+ LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
)
ENDIF(LOG_FILE)
IF(LOG_TCP)
ADD_LIBRARY(log_tcp SHARED log_tcp.c)
INSTALL(TARGETS log_tcp
- LIBRARY DESTINATION lib/accel-ppp
+ LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
)
ENDIF(LOG_TCP)
IF(LOG_SYSLOG)
ADD_LIBRARY(log_syslog SHARED log_syslog.c)
INSTALL(TARGETS log_syslog
- LIBRARY DESTINATION lib/accel-ppp
+ LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
)
ENDIF(LOG_SYSLOG)
@@ -37,7 +37,7 @@ IF(LOG_PGSQL)
ADD_LIBRARY(log_pgsql SHARED log_pgsql.c)
TARGET_LINK_LIBRARIES(log_pgsql pq)
INSTALL(TARGETS log_pgsql
- LIBRARY DESTINATION lib/accel-ppp
+ LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
)
ENDIF(LOG_PGSQL)
diff --git a/accel-pppd/radius/CMakeLists.txt b/accel-pppd/radius/CMakeLists.txt
index d139fe1..db56b5d 100644
--- a/accel-pppd/radius/CMakeLists.txt
+++ b/accel-pppd/radius/CMakeLists.txt
@@ -19,7 +19,7 @@ ADD_DEFINITIONS(-DDICTIONARY="${CMAKE_INSTALL_PREFIX}/share/accel-ppp/radius/dic
ADD_LIBRARY(radius SHARED ${sources})
INSTALL(TARGETS radius
- LIBRARY DESTINATION lib/accel-ppp
+ LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
)
FILE(GLOB dict "${CMAKE_CURRENT_SOURCE_DIR}/dict/*")
INSTALL(FILES ${dict} DESTINATION share/accel-ppp/radius)
diff --git a/accel-pppd/shaper/CMakeLists.txt b/accel-pppd/shaper/CMakeLists.txt
index 3c1ac95..7f211fd 100644
--- a/accel-pppd/shaper/CMakeLists.txt
+++ b/accel-pppd/shaper/CMakeLists.txt
@@ -1,6 +1,6 @@
ADD_LIBRARY(shaper SHARED shaper.c limiter.c leaf_qdisc.c tc_core.c)
INSTALL(TARGETS shaper
- LIBRARY DESTINATION lib/accel-ppp
+ LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
)
diff --git a/accel-pppd/triton/CMakeLists.txt b/accel-pppd/triton/CMakeLists.txt
index 105b62a..0dc7ba5 100644
--- a/accel-pppd/triton/CMakeLists.txt
+++ b/accel-pppd/triton/CMakeLists.txt
@@ -30,11 +30,11 @@ ENDIF (HAVE_TIMERFD)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-ADD_DEFINITIONS(-DMODULE_PATH="${CMAKE_INSTALL_PREFIX}/lib/accel-ppp")
+ADD_DEFINITIONS(-DMODULE_PATH="${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/accel-ppp")
ADD_LIBRARY(triton SHARED ${sources_c})
TARGET_LINK_LIBRARIES(triton dl)
INSTALL(TARGETS triton
- LIBRARY DESTINATION lib/accel-ppp
+ LIBRARY DESTINATION lib${LIB_SUFFIX}/accel-ppp
)