Skip to content

Commit 38a8dda

Browse files
committedJan 4, 2017
Add qgis_app.h with APP_EXPORT macro
1 parent d006784 commit 38a8dda

File tree

114 files changed

+119
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+119
-4
lines changed
 

‎CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,6 @@ ELSE (WIN32)
581581

582582
ENDIF(WIN32)
583583

584-
ADD_DEFINITIONS("-DAPP_EXPORT=${DLLIMPORT}")
585584
ADD_DEFINITIONS("-DCUSTOMWIDGETS_EXPORT=${DLLIMPORT}")
586585
ADD_DEFINITIONS("-DSERVER_EXPORT=${DLLIMPORT}")
587586

‎src/app/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ INCLUDE_DIRECTORIES(
528528
${CMAKE_BINARY_DIR}/src/gui
529529
${CMAKE_BINARY_DIR}/src/python
530530
${CMAKE_BINARY_DIR}/src/analysis
531+
${CMAKE_BINARY_DIR}/src/app
531532
)
532533
INCLUDE_DIRECTORIES(SYSTEM
533534
${QWT_INCLUDE_DIR}
@@ -591,9 +592,6 @@ ELSE (ANDROID)
591592
ADD_EXECUTABLE(${QGIS_APP_NAME} MACOSX_BUNDLE WIN32 ${QGIS_APPMAIN_SRCS} ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
592593
ENDIF (ANDROID)
593594

594-
REMOVE_DEFINITIONS("-DAPP_EXPORT=${DLLIMPORT}")
595-
ADD_DEFINITIONS("\"-DAPP_EXPORT=${DLLEXPORT}\"")
596-
597595
# Putting IMAGE_RCC_SRCS into qgis_app lib is causing problems when the lib is
598596
# loaded (by plugin for example) in test unit (qgis_composerpicturetest).
599597
ADD_LIBRARY(qgis_app SHARED ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${QGIS_APP_HDRS} ${QGIS_APP_MOC_HDRS})
@@ -613,6 +611,12 @@ TARGET_LINK_LIBRARIES(qgis_app
613611
libdxfrw
614612
)
615613

614+
GENERATE_EXPORT_HEADER(
615+
qgis_app
616+
BASE_NAME APP
617+
EXPORT_FILE_NAME qgis_app.h
618+
)
619+
616620
IF (NOT ANDROID)
617621
SET_TARGET_PROPERTIES(qgis_app PROPERTIES
618622
VERSION ${COMPLETE_VERSION}

0 commit comments

Comments
 (0)
Please sign in to comment.