Skip to content

Commit

Permalink
fixed the find_component that did not advertise it with the found var…
Browse files Browse the repository at this point in the history
…iable
  • Loading branch information
yobeonline committed Feb 13, 2024
1 parent 1bdfe5a commit 37656ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ if(IO1_WITH_TESTS)
list(APPEND VCPKG_MANIFEST_FEATURES "tests")
endif()

set(IO1_PROJECT_NAME "money")

project(
io1-money
io1-${IO1_PROJECT_NAME}
VERSION 0.1.0
DESCRIPTION
"A class to store money amounts for personal accounting applications."
Expand All @@ -27,10 +29,10 @@ target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_20)
set_target_properties(
${PROJECT_NAME}
PROPERTIES
EXPORT_NAME "money"
EXPORT_NAME ${IO1_PROJECT_NAME}
)

add_library(io1::money ALIAS ${PROJECT_NAME})
add_library(io1::${IO1_PROJECT_NAME} ALIAS ${PROJECT_NAME})

install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME})

Expand Down
3 changes: 3 additions & 0 deletions cmake/config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

foreach(component ${io1_FIND_COMPONENTS})
include(${CMAKE_CURRENT_LIST_DIR}/io1-${component}.cmake)
if (TARGET io1::${component})
set(io1_${component}_FOUND TRUE)
endif()
endforeach()

check_required_components(io1)

0 comments on commit 37656ac

Please sign in to comment.