Skip to content
Permalink
Browse files

Add qgis_python.h with PYTHON_EXPORT macro

  • Loading branch information
m-kuhn committed Jan 4, 2017
1 parent 4c1f178 commit 2306c1136a06dd7b64cea1c1558fa0c169140584
@@ -581,7 +581,6 @@ ELSE (WIN32)

ENDIF(WIN32)

ADD_DEFINITIONS("-DPYTHON_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("-DANALYSIS_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("-DAPP_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("-DCUSTOMWIDGETS_EXPORT=${DLLIMPORT}")
@@ -526,6 +526,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}/../ui
${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/python
)
INCLUDE_DIRECTORIES(SYSTEM
${QWT_INCLUDE_DIR}
@@ -1,6 +1,3 @@
REMOVE_DEFINITIONS("-DPYTHON_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("\"-DPYTHON_EXPORT=${DLLEXPORT}\"")

SET(QGISPYTHON_SRCS qgispython.cpp qgspythonutilsimpl.cpp)

INCLUDE_DIRECTORIES(
@@ -9,6 +6,7 @@ INCLUDE_DIRECTORIES(
../core/raster
../gui
${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/python
)
INCLUDE_DIRECTORIES(SYSTEM
${PYTHON_INCLUDE_PATH}
@@ -34,6 +32,16 @@ TARGET_LINK_LIBRARIES(qgispython
${OPENPTY_LIBRARY}
)

GENERATE_EXPORT_HEADER(
qgispython
BASE_NAME PYTHON
EXPORT_FILE_NAME qgis_python.h
)

INSTALL(FILES
${PROJECT_BINARY_DIR}/qgis_python.h DESTINATION ${QGIS_INCLUDE_DIR}
)

IF (APPLE)
SET_TARGET_PROPERTIES(qgispython PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
ENDIF (APPLE)
@@ -19,6 +19,7 @@
// Needed for CMake variables defines
#include "qgsconfig.h"

#include "qgis_python.h"

#include <QString>
#include <QStringList>
@@ -196,6 +196,7 @@ INCLUDE_DIRECTORIES(SYSTEM
INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/python
../core
../core/auth
../core/dxf
@@ -23,6 +23,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../../../src/test
${CMAKE_BINARY_DIR}/src/core
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/python
)
INCLUDE_DIRECTORIES(SYSTEM
${QT_INCLUDE_DIR}

0 comments on commit 2306c11

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