Skip to content

Commit d6e6a4a

Browse files
committed
fix build of shared libraries
even if CPP-NETLIB_BUILD_SHARED_LIBS was set to ON or TRUE, the shared libraries were not build unless BUILD_SHARED_LIBS also was enabled. now either of the two needs to be set to enable shared libraries.
1 parent 9412dba commit d6e6a4a

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
@@ -18,10 +18,14 @@ option( CPP-NETLIB_DISABLE_LIBCXX "Disable using libc++ when compiling with clan
1818
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
1919
find_package( ICU )
2020

21-
if(CPP-NETLIB_BUILD_SHARED_LIBS)
21+
if(CPP-NETLIB_BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
2222
set(Boost_USE_STATIC_LIBS OFF)
23+
set(CPP-NETLIB_BUILD_SHARED_LIBS ON)
24+
set(BUILD_SHARED_LIBS ON)
2325
else()
2426
set(Boost_USE_STATIC_LIBS ON)
27+
set(CPP-NETLIB_BUILD_SHARED_LIBS OFF)
28+
set(BUILD_SHARED_LIBS OFF)
2529
endif()
2630
set(Boost_USE_MULTITHREADED ON)
2731
set(Boost_COMPONENTS system regex date_time filesystem program_options )

0 commit comments

Comments
 (0)