Skip to content

Commit

Permalink
ECS: Cmake add install rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Saverio976 committed Oct 31, 2023
1 parent 890a588 commit 5591271
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libs/B-luga-graphics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
include(GNUInstallDirs)

set(BLUGA_INCLUDE_BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/")
set(BLUGA_SOURCE_BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/")
set(BLUGA_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
set(BLUGA_SOURCE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")

add_subdirectory(deps)

Expand All @@ -40,6 +42,10 @@ install(
DIRECTORY ${BLUGA_INCLUDE_BUILD_DIR}
DESTINATION ${BLUGA_INCLUDE_INSTALL_DIR}
)
install(
DIRECTORY ${BLUGA_SOURCE_BUILD_DIR}
DESTINATION ${BLUGA_SOURCE_INSTALL_DIR}
)

export(
TARGETS ${PROJECT_NAME}
Expand Down
9 changes: 9 additions & 0 deletions libs/B-luga-physics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
include(GNUInstallDirs)

set(BLUGA_INCLUDE_BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/")
set(BLUGA_SOURCE_BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/")
set(BLUGA_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")
set(BLUGA_SOURCE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")

add_subdirectory(deps)

Expand All @@ -40,6 +42,10 @@ install(
DIRECTORY ${BLUGA_INCLUDE_BUILD_DIR}
DESTINATION ${BLUGA_INCLUDE_INSTALL_DIR}
)
install(
DIRECTORY ${BLUGA_SOURCE_BUILD_DIR}
DESTINATION ${BLUGA_SOURCE_INSTALL_DIR}
)

export(
TARGETS ${PROJECT_NAME}
Expand All @@ -51,6 +57,9 @@ install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}Targets
INCLUDES DESTINATION ${BLUGA_INCLUDE_INSTALL_DIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
install(
EXPORT ${PROJECT_NAME}Targets
Expand Down

0 comments on commit 5591271

Please sign in to comment.