Skip to content

Commit 4b8029a

Browse files
committed
Added option to build static lib and installing header
1 parent 7d16bc8 commit 4b8029a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.2)
22
project(pystring CXX)
33

4-
set(BUILD_SHARED_LIBS YES)
4+
option (BUILD_SHARED_LIBS "Build shared libraries (set to OFF to build static libs)" ON)
55

66
add_library(pystring
77
pystring.cpp
@@ -19,4 +19,8 @@ include(GNUInstallDirs)
1919
install(TARGETS pystring
2020
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
2121
)
22+
install (FILES pystring.h
23+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
24+
COMPONENT developer
25+
)
2226

0 commit comments

Comments
 (0)