[OpenWrt-Devel] [PATCH procd] cmake: use CMAKE_INSTALL_* variables
Sergiy Kibrik
sakib at meta.ua
Thu Sep 17 07:54:07 EDT 2015
Replace hard-coded installation directories with cmake-provided
variables, which gives more flexibility on where to install
final binaries. Great simplification for usage with e.g. BitBake recipes.
Signed-off-by: Sergiy Kibrik <sakib at meta.ua>
---
CMakeLists.txt | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6af17a3..78824e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@ ENDIF()
ADD_LIBRARY(setlbf SHARED service/setlbf.c)
INSTALL(TARGETS setlbf
- LIBRARY DESTINATION lib
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
@@ -39,7 +39,7 @@ ENDIF()
ADD_EXECUTABLE(procd ${SOURCES})
TARGET_LINK_LIBRARIES(procd ${LIBS})
INSTALL(TARGETS procd
- RUNTIME DESTINATION sbin
+ RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
)
@@ -47,19 +47,19 @@ ADD_EXECUTABLE(init initd/init.c initd/early.c initd/preinit.c initd/mkdev.c wat
utils/utils.c ${SOURCES_ZRAM})
TARGET_LINK_LIBRARIES(init ${LIBS})
INSTALL(TARGETS init
- RUNTIME DESTINATION sbin
+ RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
)
ADD_EXECUTABLE(udevtrigger plug/udevtrigger.c)
INSTALL(TARGETS udevtrigger
- RUNTIME DESTINATION sbin
+ RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
)
ADD_EXECUTABLE(askfirst utils/askfirst.c)
INSTALL(TARGETS askfirst
- RUNTIME DESTINATION sbin
+ RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
)
ADD_CUSTOM_COMMAND(
@@ -73,7 +73,7 @@ IF(SECCOMP_SUPPORT)
ADD_LIBRARY(preload-seccomp SHARED jail/preload.c jail/seccomp.c)
TARGET_LINK_LIBRARIES(preload-seccomp dl ubox blobmsg_json)
INSTALL(TARGETS preload-seccomp
- LIBRARY DESTINATION lib
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
ADD_DEPENDENCIES(preload-seccomp headers)
endif()
@@ -82,19 +82,19 @@ IF(JAIL_SUPPORT)
ADD_EXECUTABLE(ujail jail/jail.c jail/elf.c)
TARGET_LINK_LIBRARIES(ujail ubox)
INSTALL(TARGETS ujail
- RUNTIME DESTINATION sbin
+ RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
)
ADD_EXECUTABLE(utrace trace/trace.c)
TARGET_LINK_LIBRARIES(utrace ubox ${json} blobmsg_json)
INSTALL(TARGETS utrace
- RUNTIME DESTINATION sbin
+ RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
)
ADD_DEPENDENCIES(utrace headers)
ADD_LIBRARY(preload-trace SHARED trace/preload.c)
TARGET_LINK_LIBRARIES(preload-trace dl)
INSTALL(TARGETS preload-trace
- LIBRARY DESTINATION lib
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
--
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list