Skip to content

Commit 238ef96

Browse files
author
jef
committedMay 28, 2008

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed
 

‎CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)
173173
# platform specific stuff
174174

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

212212
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/win_build/vcdeps/. DESTINATION .)
213+
ELSE(MSVC)
214+
SET (DEFAULT_BIN_SUBDIR .)
213215
ENDIF(MSVC)
214216
ELSE (WIN32)
215217

@@ -239,9 +241,11 @@ IF (WIN32)
239241
IF (MSVC)
240242
ADD_DEFINITIONS("-DCORE_EXPORT=__declspec(dllimport)")
241243
ADD_DEFINITIONS("-DGUI_EXPORT=__declspec(dllimport)")
244+
ADD_DEFINITIONS("-DPYTHON_EXPORT=__declspec(dllimport)")
242245
ELSE (MSVC)
243246
ADD_DEFINITIONS("\"-DCORE_EXPORT=__declspec(dllimport)\"")
244247
ADD_DEFINITIONS("\"-DGUI_EXPORT=__declspec(dllimport)\"")
248+
ADD_DEFINITIONS("\"-DPYTHON_EXPORT=__declspec(dllimport)\"")
245249
ENDIF (MSVC)
246250
ELSE (WIN32)
247251
# other compilers don't use that MSVC construct

‎src/python/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
IF (WIN32)
2+
IF (MSVC)
3+
ADD_DEFINITIONS("-DPYTHON_EXPORT=__declspec(dllexport)")
4+
ELSE (MSVC)
5+
ADD_DEFINITIONS("\"-DPYTHON_EXPORT=__declspec(dllexport)\"")
6+
ENDIF (MSVC)
7+
ELSE (WIN32)
8+
# other compilers don't use that MSVC construct
9+
ADD_DEFINITIONS(-DPYTHON_EXPORT=)
10+
ENDIF (WIN32)
111

212
SET(QGISPYTHON_SRCS qgispython.cpp qgspythonutilsimpl.cpp)
313

@@ -18,6 +28,7 @@ TARGET_LINK_LIBRARIES(qgispython
1828
${QT_QTCORE_LIBRARY}
1929
${QT_QTGUI_LIBRARY}
2030
${PYTHON_LIBRARIES}
31+
qgis_core
2132
)
2233

2334
INSTALL(TARGETS qgispython

‎src/python/qgspythonutils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class QgisInterface;
3333
3434
*/
3535

36-
class QgsPythonUtils
36+
class PYTHON_EXPORT QgsPythonUtils
3737
{
3838
public:
3939

0 commit comments

Comments
 (0)
Please sign in to comment.