Skip to content

Commit

Permalink
Merge pull request #43 from marza-sergey/cmake-improvements
Browse files Browse the repository at this point in the history
Added option to build static lib and installing header using cmake
  • Loading branch information
grdanny authored Aug 18, 2024
2 parents 76a2024 + 4b8029a commit c5ca4f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.2)
project(pystring CXX)

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

add_library(pystring
pystring.cpp
Expand All @@ -19,4 +19,8 @@ include(GNUInstallDirs)
install(TARGETS pystring
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install (FILES pystring.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
COMPONENT developer
)

0 comments on commit c5ca4f5

Please sign in to comment.