Skip to content

Commit

Permalink
Fix CMake build system to use existing include directory (nemtrif#112)
Browse files Browse the repository at this point in the history
Also provide an imported target utf8::cpp for backward compatibility.
  • Loading branch information
ufleisch committed Nov 4, 2023
1 parent e41ec63 commit 40d6c67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include(GNUInstallDirs)

target_include_directories(utf8cpp INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/source>"
$<INSTALL_INTERFACE:include/utf8cpp>
$<INSTALL_INTERFACE:include>
)

include(CMakePackageConfigHelpers)
Expand Down
4 changes: 4 additions & 0 deletions utf8cppConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@

include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components("@PROJECT_NAME@")

if(NOT TARGET utf8::cpp)
add_library(utf8::cpp ALIAS utf8cpp::utf8cpp)
endif()

0 comments on commit 40d6c67

Please sign in to comment.