CMake: don't default to SHARED libraries, require explicit

This commit is contained in:
Adriaan de Groot 2023-09-28 20:52:56 +02:00
parent 77d489b5e5
commit 364e940a9a
2 changed files with 4 additions and 1 deletions

View File

@ -62,8 +62,10 @@ function(calamares_add_library)
add_library(${target} STATIC ${LIBRARY_SOURCES}) add_library(${target} STATIC ${LIBRARY_SOURCES})
elseif(LIBRARY_TARGET_TYPE STREQUAL "MODULE") elseif(LIBRARY_TARGET_TYPE STREQUAL "MODULE")
add_library(${target} MODULE ${LIBRARY_SOURCES}) add_library(${target} MODULE ${LIBRARY_SOURCES})
else() # default elseif(LIBRARY_TARGET_TYPE STREQUAL "SHARED")
add_library(${target} SHARED ${LIBRARY_SOURCES}) add_library(${target} SHARED ${LIBRARY_SOURCES})
else() # default
message(FATAL_ERROR "Invalid library type '${LIBRARY_TARGET_TYPE}'")
endif() endif()
calamares_automoc(${target}) calamares_automoc(${target})

View File

@ -45,6 +45,7 @@ endif()
calamares_add_library(calamaresui calamares_add_library(calamaresui
SOURCES ${calamaresui_SOURCES} SOURCES ${calamaresui_SOURCES}
TARGET_TYPE SHARED
EXPORT_MACRO UIDLLEXPORT_PRO EXPORT_MACRO UIDLLEXPORT_PRO
LINK_LIBRARIES LINK_LIBRARIES
${qtname}::Svg ${qtname}::Svg