Skip to content

Commit

Permalink
new fix for #1214 (reverts r9030)
Browse files Browse the repository at this point in the history
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 5f2d9f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -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
Expand Down
11 changes: 4 additions & 7 deletions src/python/CMakeLists.txt
@@ -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
Expand All @@ -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.