mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-02 09:02:03 +02:00
Fix static linking
This commit is contained in:
parent
40576e9bb9
commit
7847fc4bba
@ -202,6 +202,10 @@ elseif(NOT APPLE_IOS)
|
||||
target_link_libraries(vcmilauncher SDL2::SDL2)
|
||||
endif()
|
||||
|
||||
if(ENABLE_STATIC_LIBS OR NOT (ENABLE_EDITOR AND ENABLE_LAUNCHER))
|
||||
target_compile_definitions(vcmilauncher PRIVATE VCMIQT_STATIC)
|
||||
endif()
|
||||
|
||||
target_link_libraries(vcmilauncher vcmi vcmiqt Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network)
|
||||
target_include_directories(vcmilauncher
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
@ -217,6 +217,10 @@ if(APPLE)
|
||||
set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER vcmieditor)
|
||||
endif()
|
||||
|
||||
if(ENABLE_STATIC_LIBS OR NOT (ENABLE_EDITOR AND ENABLE_LAUNCHER))
|
||||
target_compile_definitions(vcmieditor PRIVATE VCMIQT_STATIC)
|
||||
endif()
|
||||
|
||||
target_link_libraries(vcmieditor vcmi vcmiqt Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network)
|
||||
target_include_directories(vcmieditor
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include <QtCore/QtGlobal>
|
||||
|
||||
#if VCMIQT_STATIC
|
||||
#ifdef VCMIQT_STATIC
|
||||
# define VCMIQT_LINKAGE
|
||||
#elif defined(VCMIQT_SHARED)
|
||||
# define VCMIQT_LINKAGE Q_DECL_EXPORT
|
||||
|
Loading…
Reference in New Issue
Block a user