Skip to content

Commit 08e22cd

Browse files
committed
feature: Add control flag for static compile
1 parent f1a0935 commit 08e22cd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ include(PreTarget.cmake OPTIONAL)
9191
set(PROJECT_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
9292

9393
# Add library with project file with project name as library name
94-
add_library(${pkgName} ${SRCS} ${HDRS})
94+
if(NOT BUILD_STATIC_LIBS)
95+
add_library(${pkgName} ${SRCS} ${HDRS})
96+
else()
97+
add_library(${pkgName} STATIC ${SRCS} ${HDRS})
98+
endif()
9599
# Link dependent libraries
96100
if(NOT CMAKE_VERSION VERSION_LESS 3.4)
97101
target_link_libraries(${pkgName} PRIVATE OpenSSL::SSL OpenSSL::Crypto)

0 commit comments

Comments
 (0)