File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ PROJECT(sioclient)
44option (BUILD_SHARED_LIBS "Build the shared library" OFF )
55option (Boost_USE_STATIC_LIBS "Use Boost static version" ON )
66
7+ set (MAJOR 1)
8+ set (MINOR 6)
9+ set (PATCH 0)
10+
711if (NOT CMAKE_BUILD_TYPE )
812MESSAGE (STATUS "not define build type, set to release" )
913set (CMAKE_BUILD_TYPE Release )
@@ -33,6 +37,13 @@ target_include_directories(sioclient PRIVATE ${Boost_INCLUDE_DIRS}
3337set_property (TARGET sioclient PROPERTY CXX_STANDARD 11)
3438set_property (TARGET sioclient PROPERTY CXX_STANDARD_REQUIRED ON )
3539target_link_libraries (sioclient PRIVATE ${Boost_LIBRARIES} )
40+ if (BUILD_SHARED_LIBS )
41+ set_target_properties (sioclient
42+ PROPERTIES
43+ SOVERSION ${MAJOR}
44+ VERSION ${MAJOR} .${MINOR} .${PATCH}
45+ )
46+ endif ()
3647list (APPEND TARGET_LIBRARIES sioclient)
3748
3849find_package (OpenSSL)
@@ -49,6 +60,13 @@ set_property(TARGET sioclient_tls PROPERTY CXX_STANDARD 11)
4960set_property (TARGET sioclient_tls PROPERTY CXX_STANDARD_REQUIRED ON )
5061target_link_libraries (sioclient_tls PRIVATE ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} )
5162target_compile_definitions (sioclient_tls PRIVATE -DSIO_TLS)
63+ if (BUILD_SHARED_LIBS )
64+ set_target_properties (sioclient_tls
65+ PROPERTIES
66+ SOVERSION ${MAJOR}
67+ VERSION ${MAJOR} .${MINOR} .${PATCH}
68+ )
69+ endif ()
5270list (APPEND TARGET_LIBRARIES sioclient_tls)
5371
5472endif ()
You can’t perform that action at this time.
0 commit comments