diff options
author | Gabriel Jeanneau <gabriel.jeanneau@6wind.com> | 2021-12-07 17:42:26 +0100 |
---|---|---|
committer | Stéphane Gonauer <stephane.gonauer@6wind.com> | 2022-03-04 13:11:03 +0100 |
commit | 99951ab338a1727150b312fca914631dcf838201 (patch) | |
tree | e497e319667961283c148383053ca13eec008c4f /accel-pppd | |
parent | 0b4ef9862c65bffd7c2e5798cb35948548ac724d (diff) | |
download | accel-ppp-99951ab338a1727150b312fca914631dcf838201.tar.gz accel-ppp-99951ab338a1727150b312fca914631dcf838201.zip |
accel-pppd: Fix buildroot compilation
CMAKE_FIND_ROOT_PATH variable is a list of pathes used by CMAKE to find
packages and library for compilation.
It should not be used for installation as :
- it is a list
- it points to staging folder of packaging tools.
So let's use a more standard CMAKE code to make sure
files and folders are actually installed in target destination.
Signed-off-by: Gabriel Jeanneau <gabriel.jeanneau@6wind.com>
Signed-off-by: Stéphane Gonauer <stephane.gonauer@6wind.com>
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/accel-pppd/CMakeLists.txt b/accel-pppd/CMakeLists.txt index 23a1d0a..ab8a350 100644 --- a/accel-pppd/CMakeLists.txt +++ b/accel-pppd/CMakeLists.txt @@ -1,6 +1,8 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") ADD_DEFINITIONS(-DPTHREAD_SPINLOCK) +include(GNUInstallDirs) + INCLUDE_DIRECTORIES(include) IF (MEMDEBUG) @@ -134,9 +136,9 @@ 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 ${CMAKE_FIND_ROOT_PATH}/etc RENAME accel-ppp.conf.dist) + INSTALL(FILES accel-ppp.conf DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}" RENAME accel-ppp.conf.dist) - 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/lib/accel-ppp)") + INSTALL(DIRECTORY DESTINATION "${CMAKE_INSTALL_LOCALSTATEDIR}/log/accel-ppp") + INSTALL(DIRECTORY DESTINATION "${CMAKE_INSTALL_LOCALSTATEDIR}/lib/accel-ppp") ENDIF (NOT DEFINED CPACK_TYPE) |