Skip to content
Permalink
Browse files
fix for #3999 until something better can be done
  • Loading branch information
kyngchaos committed Nov 6, 2011
1 parent 9a395e6 commit 595eef0f785eecc2f0f1c4e4aad590d7a57f4a1f
Showing with 18 additions and 2 deletions.
  1. +11 −1 src/plugins/grass/CMakeLists.txt
  2. +7 −1 src/providers/grass/CMakeLists.txt
@@ -154,10 +154,20 @@ INCLUDE_DIRECTORIES(
TARGET_LINK_LIBRARIES(grassplugin
qgisgrass
qgis_gui
grassprovider
${OPENPTY_LIBRARY}
)

# provider must be built as module on OS X so it gets loaded,
# lookup symbols dynamically instead of linking at compile time
IF (APPLE)
SET_TARGET_PROPERTIES(grassplugin PROPERTIES
LINK_FLAGS "-undefined dynamic_lookup")
ELSE (APPLE)
TARGET_LINK_LIBRARIES(grassplugin
grassprovider
)
ENDIF (APPLE)

# override default path where built files are put to allow running qgis without installing
# the binary goes under libexec subdir
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_LIBEXEC_SUBDIR}/grass/bin)
@@ -47,7 +47,13 @@ ENDIF (APPLE)
#

QT4_WRAP_CPP(GRASS_PROVIDER_MOC_SRCS qgsgrassprovider.h)
ADD_LIBRARY(grassprovider SHARED qgsgrassprovider.cpp ${GRASS_PROVIDER_MOC_SRCS})
# provider must be built as module on OS X so it gets loaded,
# other modules that need provider symbols must dynamically lookup them
IF (APPLE)
ADD_LIBRARY(grassprovider MODULE qgsgrassprovider.cpp ${GRASS_PROVIDER_MOC_SRCS})
ELSE (APPLE)
ADD_LIBRARY(grassprovider SHARED qgsgrassprovider.cpp ${GRASS_PROVIDER_MOC_SRCS})
ENDIF (APPLE)
SET_TARGET_PROPERTIES(grassprovider PROPERTIES COMPILE_FLAGS "\"-DGRASS_EXPORT=${DLLEXPORT}\" \"-DGRASS_LIB_EXPORT=${DLLIMPORT}\"" )
TARGET_LINK_LIBRARIES(grassprovider qgisgrass)

0 comments on commit 595eef0

Please sign in to comment.