Skip to content
Permalink
Browse files

temporary fix for #8575 (building app as DLL is more involved and req…

…uires a CORE/GUI/APP_EXPORT macro dance...)
  • Loading branch information
jef-n committed Sep 5, 2013
1 parent 618b58b commit 2c2d6757ddf605dc77ae228e78707d8d6f31e61b
Showing with 13 additions and 4 deletions.
  1. +7 −4 src/app/CMakeLists.txt
  2. +2 −0 src/app/qgisapp.cpp
  3. +4 −0 tests/src/app/CMakeLists.txt
@@ -1,5 +1,4 @@
SET(QGIS_APP_SRCS
main.cpp
qgisapp.cpp
qgisappinterface.cpp
qgisappstylesheet.cpp
@@ -452,13 +451,17 @@ ENDIF (POSTGRES_FOUND)

#############
IF (ANDROID)
ADD_LIBRARY(${QGIS_APP_NAME} SHARED ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${QGIS_APP_HDRS} ${QGIS_APP_MOC_HDRS} ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
ADD_LIBRARY(${QGIS_APP_NAME} SHARED main.cpp ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${QGIS_APP_HDRS} ${QGIS_APP_MOC_HDRS} ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
ELSE (ANDROID)
ADD_EXECUTABLE(${QGIS_APP_NAME} MACOSX_BUNDLE WIN32 ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
ADD_EXECUTABLE(${QGIS_APP_NAME} MACOSX_BUNDLE WIN32 main.cpp ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
ENDIF (ANDROID)

# shared library used by tests - TODO: use it also for qgis executable?
ADD_LIBRARY(qgis_app SHARED ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${QGIS_APP_HDRS} ${QGIS_APP_MOC_HDRS} ${IMAGE_RCC_SRCS})
ADD_LIBRARY(qgis_app STATIC ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${QGIS_APP_HDRS} ${QGIS_APP_MOC_HDRS} ${IMAGE_RCC_SRCS})

if(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8)
SET_TARGET_PROPERTIES(qgis_app PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
ENDIF(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8)

TARGET_LINK_LIBRARIES(${QGIS_APP_NAME}
${QWT_LIBRARY}
@@ -8864,12 +8864,14 @@ void QgisApp::keyPressEvent( QKeyEvent * e )
{
stopRendering();
}
#if 0
#if defined(Q_OS_WIN)&& defined(QGISDEBUG)
else if ( e->key() == Qt::Key_Backslash && e->modifiers() & Qt::ControlModifier )
{
extern LONG WINAPI qgisCrashDump( struct _EXCEPTION_POINTERS *ExceptionInfo );
qgisCrashDump( 0 );
}
#endif
#endif
else
{
@@ -74,6 +74,10 @@ MACRO (ADD_QGIS_TEST testname testsrc)
qgis_gui
qgis_analysis
qgis_app)
IF(WIN32)
ADD_DEFINITIONS(-DQWT_DLL)
TARGET_LINK_LIBRARIES(qgis_${testname} DbgHelp)
ENDIF(WIN32)
ADD_TEST(qgis_${testname} ${CMAKE_CURRENT_BINARY_DIR}/../../../output/bin/qgis_${testname})
#SET_TARGET_PROPERTIES(qgis_${testname} PROPERTIES
# INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${QGIS_LIB_DIR}

0 comments on commit 2c2d675

Please sign in to comment.
You can’t perform that action at this time.