mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-27 13:34:19 -04:00
Add ZINT_SHARED CMake option
Either shared or static (or both) libraries can be built now. Executables (zint and zint-qt) are linked with the static library if the shared library it not built.
This commit is contained in:
parent
2f8681b21a
commit
66431d8ec1
8 changed files with 53 additions and 18 deletions
|
@ -16,7 +16,11 @@ target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_SOURCE_DIR}/backend")
|
|||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "zint")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} zint)
|
||||
if(ZINT_SHARED)
|
||||
target_link_libraries(${PROJECT_NAME} zint)
|
||||
else()
|
||||
target_link_libraries(${PROJECT_NAME} zint-static)
|
||||
endif()
|
||||
if(NOT HAVE_GETOPT)
|
||||
target_link_libraries(${PROJECT_NAME} zint_bundled_getopt)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue