Skip to content

Commit

Permalink
Added option BUILD_SHARED_LIBS
Browse files Browse the repository at this point in the history
  • Loading branch information
randaz81 committed Sep 5, 2023
1 parent 1c5a4e6 commit 0b2c2b7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,33 @@ set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "Generated Files")
# See cmake/YarpOptions.cmake.
#include(YarpOptions)

#########################################################################
# Control whether libraries are shared or static (imported from YarpOptions)

option(BUILD_SHARED_LIBS "Compile shared libraries rather than linking statically" ON)
mark_as_advanced(BUILD_SHARED_LIBS)

set(YARP_DLL OFF)
if(BUILD_SHARED_LIBS)
set(YARP_DLL ON)
endif()

set (YARP_LINK_PLUGINS TRUE)
if(YARP_FORCE_DYNAMIC_PLUGINS OR BUILD_SHARED_LIBS)
set (YARP_LINK_PLUGINS FALSE)
endif()

#########################################################################
# Turn on testing (imported from YarpOptions)

option(YARP_COMPILE_TESTS "Enable YARP tests" OFF)
if(YARP_COMPILE_TESTS)
enable_testing()
endif()

#########################################################################
# Other stuff

message(STATUS "Using:")
message(STATUS " CMake: ${CMAKE_VERSION} (${CMAKE_COMMAND})")
message(STATUS " C Compiler: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION} (${CMAKE_C_COMPILER})")
Expand Down

0 comments on commit 0b2c2b7

Please sign in to comment.