Skip to content

Commit

Permalink
honor BUILD_SHARED_LIBS (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelarguedas authored and dirk-thomas committed Mar 22, 2018
1 parent fe52841 commit d9f7f27
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ament_index_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-std=c++14 -Wall -Wextra -Wpedantic)
endif()

option(
BUILD_SHARED_LIBS
"Global flag to cause add_library() to create shared libraries if on. \
If set to true, this will cause all libraries to be built shared \
unless the library was explicitly added as a static library."
ON)

find_package(ament_cmake REQUIRED)

add_library(${PROJECT_NAME} SHARED
add_library(${PROJECT_NAME}
src/get_package_prefix.cpp
src/get_package_share_directory.cpp
src/get_packages_with_prefixes.cpp
Expand Down

0 comments on commit d9f7f27

Please sign in to comment.