Skip to content

Commit a6f3ceb

Browse files
Add option to skip install rules (#25)
1 parent fc39f21 commit a6f3ceb

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

CMakeLists.txt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ project(WrenBind17)
66
option(WRENBIND17_BUILD_TESTS "Build with tests" OFF)
77
option(WRENBIND17_BUILD_WREN "Build Wren library too" OFF)
88
option(WRENBIND17_COVERAGE "Enable coverage reporting" OFF)
9+
option(WRENBIND17_INSTALL_RULES "Install headers" ON)
910

1011
# Add WrenBind17 header only library
1112
add_library(${PROJECT_NAME} INTERFACE)
@@ -62,11 +63,13 @@ if(WRENBIND17_BUILD_TESTS)
6263
endif()
6364
endif()
6465

65-
# install headers
66-
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/wrenbind17"
67-
DESTINATION include
68-
FILES_MATCHING
69-
PATTERN "*.hxx"
70-
PATTERN "*.hpp"
71-
PATTERN "*.h"
72-
)
66+
if(WRENBIND17_INSTALL_RULES)
67+
# install headers
68+
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/wrenbind17"
69+
DESTINATION include
70+
FILES_MATCHING
71+
PATTERN "*.hxx"
72+
PATTERN "*.hpp"
73+
PATTERN "*.h"
74+
)
75+
endif()

0 commit comments

Comments
 (0)