From 99951ab338a1727150b312fca914631dcf838201 Mon Sep 17 00:00:00 2001 From: Gabriel Jeanneau Date: Tue, 7 Dec 2021 17:42:26 +0100 Subject: accel-pppd: Fix buildroot compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Stéphane Gonauer --- accel-pppd/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'accel-pppd/CMakeLists.txt') 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) -- cgit v1.2.3