Define CMake library object lists globally
OBJECT collections in CMake don't generate any artifacts so these are safe to hoist out and define globally. library OBJECT targets are just a list of filenames. It can be useful for other projects to include lists of sources directly regardless of build mode (shared, static, or library).
This commit is contained in:
@@ -29,8 +29,8 @@ else()
|
||||
add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\")
|
||||
endif()
|
||||
|
||||
add_library(tls-objects OBJECT ${TLS_SRC})
|
||||
if (BUILD_SHARED)
|
||||
add_library(tls-objects OBJECT ${TLS_SRC})
|
||||
add_library(tls STATIC $<TARGET_OBJECTS:tls-objects>)
|
||||
add_library(tls-shared SHARED $<TARGET_OBJECTS:tls-objects>)
|
||||
if (WIN32)
|
||||
|
Reference in New Issue
Block a user