Skip to content

Commit b0194fa

Browse files
committed
Allow static libs
- Remove SHARED option from add_library to allow static libs, CMake then respects the standard BUILD_SHARED_LIBS option.
1 parent 0e1d97e commit b0194fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ link_directories(
131131

132132
file(GLOB CAPI_SRCS "src/CommonAPI/*.cpp")
133133
list(SORT CAPI_SRCS)
134-
add_library(CommonAPI SHARED ${CAPI_SRCS})
134+
add_library(CommonAPI ${CAPI_SRCS})
135135
target_link_libraries(CommonAPI PRIVATE ${DL_LIBRARY} ${DLT_LIBRARIES})
136136
set_target_properties(CommonAPI PROPERTIES VERSION ${LIBCOMMONAPI_MAJOR_VERSION}.${LIBCOMMONAPI_MINOR_VERSION}.${LIBCOMMONAPI_PATCH_VERSION} SOVERSION ${LIBCOMMONAPI_MAJOR_VERSION}.${LIBCOMMONAPI_MINOR_VERSION}.${LIBCOMMONAPI_PATCH_VERSION} LINKER_LANGUAGE C)
137137
target_include_directories(CommonAPI INTERFACE

0 commit comments

Comments
 (0)