Skip to content

Commit a49df6c

Browse files
committed
Fix cmake install
1 parent aaa789e commit a49df6c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

CMakeLists.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ project(
1515

1616
# [CMAKE.SKIP_EXAMPLES]
1717
option(
18-
BEMAN_EXEMPLAR_BUILD_EXAMPLES
18+
BEMAN_INPLACE_VECTOR_BUILD_EXAMPLES
1919
"Enable building examples. Default: ON. Values: { ON, OFF }."
2020
${PROJECT_IS_TOP_LEVEL}
2121
)
@@ -51,24 +51,24 @@ target_include_directories(
5151
INTERFACE
5252
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
5353
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
54-
$<INSTALL_INTERFACE:include>
54+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
5555
)
5656

5757
# Install the InplaceVector library to the appropriate destination
5858
install(
5959
TARGETS beman.inplace_vector
60-
EXPORT ${TARGETS_EXPORT_NAME}
61-
DESTINATION
62-
${CMAKE_INSTALL_LIBDIR}
60+
EXPORT beman.inplace_vector-targets
61+
FILE_SET HEADERS
6362
)
6463

6564
# Install the header files to the appropriate destination
6665
install(
67-
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
68-
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${CMAKE_PROJECT_NAME}
66+
DIRECTORY
67+
${CMAKE_CURRENT_SOURCE_DIR}/include/
68+
${CMAKE_CURRENT_BINARY_DIR}/include/
69+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
6970
FILES_MATCHING
70-
PATTERN
71-
"${CMAKE_CURRENT_SOURCE_DIR}/include/beman/inplace_vector/inplace_vector.hpp"
71+
PATTERN "*.hpp"
7272
)
7373

7474
if(BEMAN_INPLACE_VECTOR_BUILD_TESTS)
@@ -92,6 +92,6 @@ if(BEMAN_INPLACE_VECTOR_BUILD_TESTS)
9292
add_subdirectory(tests/beman/inplace_vector)
9393
endif()
9494

95-
if(BEMAN_EXEMPLAR_BUILD_EXAMPLES)
95+
if(BEMAN_INPLACE_VECTOR_BUILD_EXAMPLES)
9696
add_subdirectory(examples)
9797
endif()

0 commit comments

Comments
 (0)