Skip to content
Permalink
Browse files
new fix for #1214 (reverts r9030)
git-svn-id: http://svn.osgeo.org/qgis/trunk@9044 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 10, 2008
1 parent 7587085 commit 5f2d9f956326a7b46a14df55619f2609a2b1d2fc
Showing with 7 additions and 7 deletions.
  1. +3 −0 src/app/qgisapp.cpp
  2. +4 −7 src/python/CMakeLists.txt
@@ -3833,6 +3833,9 @@ void QgisApp::loadPythonSupport()
QString pythonlibName("qgispython");
#ifdef Q_WS_MAC
pythonlibName.prepend(QgsApplication::prefixPath() + "/lib/");
#endif
#ifdef __MINGW32__
pythonlibName.prepend("lib");
#endif
QLibrary pythonlib(pythonlibName);
// It's necessary to set these two load hints, otherwise Python library won't work correctly
@@ -1,11 +1,8 @@
SET(TARGET_NAME "qgispython")

IF (WIN32)
IF (MSVC)
ADD_DEFINITIONS("-DPYTHON_EXPORT=__declspec(dllexport)")
ELSE (MSVC)
ADD_DEFINITIONS("\"-DPYTHON_EXPORT=__declspec(dllexport)\"")
SET(TARGET_NAME "libqgispython")
ENDIF (MSVC)
ELSE (WIN32)
# other compilers don't use that MSVC construct
@@ -22,20 +19,20 @@ INCLUDE_DIRECTORIES(
../gui
${PYTHON_INCLUDE_PATH})

ADD_LIBRARY (${TARGET_NAME} SHARED ${QGISPYTHON_SRCS})
ADD_LIBRARY (qgispython SHARED ${QGISPYTHON_SRCS})

SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
SET_TARGET_PROPERTIES(qgispython PROPERTIES
VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}
SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR})


TARGET_LINK_LIBRARIES(${TARGET_NAME}
TARGET_LINK_LIBRARIES(qgispython
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${PYTHON_LIBRARIES}
qgis_core
)

INSTALL(TARGETS ${TARGET_NAME}
INSTALL(TARGETS qgispython
RUNTIME DESTINATION ${QGIS_BIN_DIR}
LIBRARY DESTINATION ${QGIS_LIB_DIR})

0 comments on commit 5f2d9f9

Please sign in to comment.