Skip to content

Commit

Permalink
cmake: try adding install target
Browse files Browse the repository at this point in the history
  • Loading branch information
Smertig committed May 6, 2024
1 parent fc91b95 commit 044cc2f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ add_library(rcmp STATIC

target_compile_features(rcmp PUBLIC cxx_std_17)

target_include_directories(rcmp PRIVATE ${RCMP_EXTERNAL_DIR}/nmd/include)

# Declare public include directories
include(GNUInstallDirs)
target_include_directories(rcmp PUBLIC
${PROJECT_SOURCE_DIR}/include
${RCMP_EXTERNAL_DIR}/nmd/include
)
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)


install(DIRECTORY ${PROJECT_SOURCE_DIR}/include DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

target_compile_definitions(rcmp PUBLIC RCMP_VERSION_MAJOR=${RCMP_VERSION_MAJOR})
target_compile_definitions(rcmp PUBLIC RCMP_VERSION_MINOR=${RCMP_VERSION_MINOR})
Expand Down

0 comments on commit 044cc2f

Please sign in to comment.