Skip to content

Commit 6d51425

Browse files
committed
Sync cmake's installation layout to Makefile and Meson builds
1 parent e2987f0 commit 6d51425

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
cmake_minimum_required(VERSION 3.5)
2-
project(pystring CXX)
2+
project(pystring LANGUAGES CXX VERSION 1.1.4)
33

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

66
add_library(pystring
77
pystring.cpp
88
pystring.h
99
)
10+
set_target_properties(pystring PROPERTIES
11+
VERSION ${PROJECT_VERSION}
12+
SOVERSION ${PROJECT_VERSION_MAJOR}
13+
)
1014

1115
add_executable (pystring_test test.cpp)
1216
TARGET_LINK_LIBRARIES (pystring_test pystring)
@@ -20,7 +24,7 @@ install(TARGETS pystring
2024
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
2125
)
2226
install (FILES pystring.h
23-
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
27+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
2428
COMPONENT developer
2529
)
2630

0 commit comments

Comments
 (0)