Skip to content

Commit

Permalink
chaing install targets so that io1-money is installed and not io1.
Browse files Browse the repository at this point in the history
  • Loading branch information
yobeonline committed Feb 8, 2024
1 parent acbe4cc commit 260db36
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include(GNUInstallDirs)
add_library(${PROJECT_NAME} INTERFACE include/io1/money.hpp)
target_include_directories(
${PROJECT_NAME}
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_20)

Expand All @@ -39,16 +39,16 @@ write_basic_package_version_file(

configure_package_config_file(
"${PROJECT_SOURCE_DIR}/cmake/config.cmake.in" "${PROJECT_NAME}Config.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/io1/cmake)
INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)

install(
EXPORT ${PROJECT_NAME}
NAMESPACE io1::
DESTINATION ${CMAKE_INSTALL_DATADIR}/io1/cmake)
DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)

install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
DESTINATION ${CMAKE_INSTALL_DATADIR}/io1/cmake)
DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)

if(IO1_WITH_TESTS)
include(CTest)
Expand All @@ -63,5 +63,5 @@ if(IO1_WITH_TESTS)
NAME test_${PROJECT_NAME}
COMMAND test_${PROJECT_NAME} --reporters=junit
--out=junit_test_${PROJECT_NAME}.xml
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
endif()

0 comments on commit 260db36

Please sign in to comment.