Skip to content

Commit

Permalink
CMake: adopt CMAKE_INSTALL_<dir> for install locations
Browse files Browse the repository at this point in the history
  • Loading branch information
bramoosterhuis committed May 18, 2024
1 parent a5851bb commit 85fbf26
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Source/asconnector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ target_link_libraries(
# Installs the ASSystemService daemon
install(
TARGETS ASSystemService
RUNTIME DESTINATION bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

# Install the Service dependencies JSON file
Expand Down
12 changes: 6 additions & 6 deletions Source/bluetooth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ endif()

install(
TARGETS ${TARGET} EXPORT ${TARGET}Targets # for downstream dependencies
ARCHIVE DESTINATION lib COMPONENT libs # static lib
LIBRARY DESTINATION lib COMPONENT libs # shared lib
RUNTIME DESTINATION bin COMPONENT libs # binaries
FRAMEWORK DESTINATION bin COMPONENT libs # for mac
PUBLIC_HEADER DESTINATION include/${NAMESPACE}/bluetooth COMPONENT devel # headers for mac (note the different component -> different package)
INCLUDES DESTINATION include/${NAMESPACE} # default include path
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # static lib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # shared lib
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # binaries
FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # for mac
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/bluetooth COMPONENT devel # headers for mac (note the different component -> different package)
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE} # default include path
)

InstallPackageConfig(
Expand Down
14 changes: 7 additions & 7 deletions Source/bluetooth/audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,17 @@ endif()

install(
TARGETS ${TARGET} EXPORT ${TARGET}Targets # for downstream dependencies
ARCHIVE DESTINATION lib COMPONENT libs # static lib
LIBRARY DESTINATION lib COMPONENT libs # shared lib
RUNTIME DESTINATION bin COMPONENT libs # binaries
FRAMEWORK DESTINATION bin COMPONENT libs # for mac
PUBLIC_HEADER DESTINATION include/${NAMESPACE}/bluetooth/audio COMPONENT devel
INCLUDES DESTINATION include/${NAMESPACE} # default include path
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # static lib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # shared lib
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # binaries
FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # for mac
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/bluetooth/audio COMPONENT devel
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE} # default include path
)

install(
FILES ${CODEC_HEADERS}
DESTINATION include/${NAMESPACE}/bluetooth/audio/codecs
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/bluetooth/audio/codecs
)

InstallPackageConfig(
Expand Down
12 changes: 6 additions & 6 deletions Source/bluetooth/gatt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ endif()

install(
TARGETS ${TARGET} EXPORT ${TARGET}Targets # for downstream dependencies
ARCHIVE DESTINATION lib COMPONENT libs # static lib
LIBRARY DESTINATION lib COMPONENT libs # shared lib
RUNTIME DESTINATION bin COMPONENT libs # binaries
FRAMEWORK DESTINATION bin COMPONENT libs # for mac
PUBLIC_HEADER DESTINATION include/${NAMESPACE}/bluetooth/gatt COMPONENT devel
INCLUDES DESTINATION include/${NAMESPACE} # default include path
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # static lib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # shared lib
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # binaries
FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # for mac
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/bluetooth/gatt COMPONENT devel
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE} # default include path
)

InstallPackageConfig(
Expand Down
12 changes: 6 additions & 6 deletions Source/broadcast/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ target_include_directories( ${TARGET}
# ===========================================================================================
install(
TARGETS ${TARGET} EXPORT ${TARGET}Targets # for downstream dependencies
ARCHIVE DESTINATION lib COMPONENT libs # static lib
LIBRARY DESTINATION lib COMPONENT libs # shared lib
RUNTIME DESTINATION bin COMPONENT libs # binaries
FRAMEWORK DESTINATION bin COMPONENT libs # for mac
PUBLIC_HEADER DESTINATION include/${NAMESPACE}/broadcast COMPONENT devel # for mac
INCLUDES DESTINATION include/${NAMESPACE}/broadcast # headers
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # static lib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs # shared lib
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # binaries
FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # for mac
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/broadcast COMPONENT devel # for mac
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/broadcast # headers
)

# ===========================================================================================
Expand Down
2 changes: 1 addition & 1 deletion Source/broadcast/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ target_link_libraries(BroadcastTester
${NAMESPACE}Core::${NAMESPACE}Core
)

install(TARGETS BroadcastTester DESTINATION bin)
install(TARGETS BroadcastTester DESTINATION ${CMAKE_INSTALL_BINDIR})

0 comments on commit 85fbf26

Please sign in to comment.