Skip to content
Permalink
Browse files

fix building python plugin on windows

git-svn-id: http://svn.osgeo.org/qgis/trunk@8536 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed May 28, 2008
1 parent 02f5006 commit 671b5f2b74b1a7ea83c749100eb860d6e6d2de41
Showing with 17 additions and 2 deletions.
  1. +5 −1 CMakeLists.txt
  2. +11 −0 src/python/CMakeLists.txt
  3. +1 −1 src/python/qgspythonutils.h
@@ -173,7 +173,6 @@ ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)
# platform specific stuff

IF (WIN32)
SET (DEFAULT_BIN_SUBDIR .)
SET (DEFAULT_LIB_SUBDIR lib)
SET (DEFAULT_DATA_SUBDIR .)
SET (DEFAULT_PLUGIN_SUBDIR plugins)
@@ -185,6 +184,7 @@ IF (WIN32)
# will pop up mid way through the build process and block
# the build, plus the python bindings wont build correctly
SET (CMAKE_MAKE_PROGRAM nmake)
SET (DEFAULT_BIN_SUBDIR bin)
# put all the build products into a single directory
# under build (doesnt affect install target) to make for
# easier debugging.
@@ -210,6 +210,8 @@ IF (WIN32)
ADD_DEFINITIONS(-DQGISDEBUG=1)

INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/win_build/vcdeps/. DESTINATION .)
ELSE(MSVC)
SET (DEFAULT_BIN_SUBDIR .)
ENDIF(MSVC)
ELSE (WIN32)

@@ -239,9 +241,11 @@ IF (WIN32)
IF (MSVC)
ADD_DEFINITIONS("-DCORE_EXPORT=__declspec(dllimport)")
ADD_DEFINITIONS("-DGUI_EXPORT=__declspec(dllimport)")
ADD_DEFINITIONS("-DPYTHON_EXPORT=__declspec(dllimport)")
ELSE (MSVC)
ADD_DEFINITIONS("\"-DCORE_EXPORT=__declspec(dllimport)\"")
ADD_DEFINITIONS("\"-DGUI_EXPORT=__declspec(dllimport)\"")
ADD_DEFINITIONS("\"-DPYTHON_EXPORT=__declspec(dllimport)\"")
ENDIF (MSVC)
ELSE (WIN32)
# other compilers don't use that MSVC construct
@@ -1,3 +1,13 @@
IF (WIN32)
IF (MSVC)
ADD_DEFINITIONS("-DPYTHON_EXPORT=__declspec(dllexport)")
ELSE (MSVC)
ADD_DEFINITIONS("\"-DPYTHON_EXPORT=__declspec(dllexport)\"")
ENDIF (MSVC)
ELSE (WIN32)
# other compilers don't use that MSVC construct
ADD_DEFINITIONS(-DPYTHON_EXPORT=)
ENDIF (WIN32)

SET(QGISPYTHON_SRCS qgispython.cpp qgspythonutilsimpl.cpp)

@@ -18,6 +28,7 @@ TARGET_LINK_LIBRARIES(qgispython
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${PYTHON_LIBRARIES}
qgis_core
)

INSTALL(TARGETS qgispython
@@ -33,7 +33,7 @@ class QgisInterface;
*/

class QgsPythonUtils
class PYTHON_EXPORT QgsPythonUtils
{
public:

0 comments on commit 671b5f2

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