summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Popov <6yearold@gmail.com>2015-10-21 18:25:56 (GMT)
committerGleb Popov <6yearold@gmail.com>2015-10-29 15:54:19 (GMT)
commitc339bc5d0a28d21990ea4eb876703ddc8217a22f (patch)
tree5ff677c6e01f98d90854a7f7dfd0e8e085d90a49
parent466eb79615ba313ff6ef418177a15a6961fbfb36 (diff)
Fix okularplugin linking on VS 2015.
okularplugin target from mobile/components suffers from the same problem as okularpart in https://git.reviewboard.kde.org/r/125741/ But the cause is a bit different now. okularplugin uses settings.cpp generated by KConfig and its header declares Settings class with OKULARCORE_EXPORT. For okularplugin target this macro gets expanded to __declspec(dllimport) and it makes linker to look for Settings class symbols in okularcore. Fix this by tricking VS that we are building okularcore target. REVIEW: 125742
-rw-r--r--mobile/components/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/mobile/components/CMakeLists.txt b/mobile/components/CMakeLists.txt
index a5db04e..e09326a 100644
--- a/mobile/components/CMakeLists.txt
+++ b/mobile/components/CMakeLists.txt
@@ -20,6 +20,8 @@ set(okular_SRCS
kconfig_add_kcfg_files(okular_SRCS ${CMAKE_SOURCE_DIR}/conf/settings.kcfgc )
+set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/settings.cpp PROPERTIES COMPILE_DEFINITIONS "okularpart_EXPORTS")
+
add_library(okularplugin SHARED ${okular_SRCS})
target_link_libraries(okularplugin
Qt5::Quick