Skip to content

Commit 11f6107

Browse files
authored
Merge pull request #21 from llm96/fix/cmake-install
Fix missing is_utf8Targets.cmake installed file
2 parents 35ca270 + df06240 commit 11f6107

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ include(GNUInstallDirs)
1010
include(CTest)
1111

1212
option(IS_UTF8_SANITIZE "Sanitize addresses" OFF)
13+
option(IS_UTF8_BENCHMARKS "Build benchmarks" ${PROJECT_IS_TOP_LEVEL})
1314

1415
if (NOT CMAKE_BUILD_TYPE)
1516
message(STATUS "No build type selected, default to Release")
@@ -42,8 +43,9 @@ else()
4243
message(STATUS "The tests are disabled.")
4344
endif(BUILD_TESTING)
4445

45-
46-
add_subdirectory(benchmarks)
46+
if (IS_UTF8_BENCHMARKS)
47+
add_subdirectory(benchmarks)
48+
endif()
4749

4850
message(STATUS "Compiling using the C++ standard:" ${CMAKE_CXX_STANDARD})
4951
# ---- Install rules ----
@@ -88,6 +90,12 @@ set(
8890
)
8991
mark_as_advanced(IS_UTF8_INSTALL_CMAKEDIR)
9092

93+
install(
94+
EXPORT is_utf8Targets
95+
DESTINATION "${IS_UTF8_INSTALL_CMAKEDIR}"
96+
NAMESPACE is_utf8::
97+
)
98+
9199
install(
92100
FILES
93101
"${PROJECT_BINARY_DIR}/is_utf8-config.cmake"

0 commit comments

Comments
 (0)