diff --git a/cmake/SIPMacros.cmake b/cmake/SIPMacros.cmake index 1d58e900a45f..e69e208b6a10 100644 --- a/cmake/SIPMacros.cmake +++ b/cmake/SIPMacros.cmake @@ -190,13 +190,8 @@ MACRO(BUILD_SIP_PYTHON_MODULE MODULE_NAME SIP_FILES EXTRA_OBJECTS) ENDIF (${SIP_VERSION_STR} VERSION_LESS 5.0.0) SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES CXX_VISIBILITY_PRESET default) - IF (NOT APPLE) - TARGET_LINK_LIBRARIES(${_logical_name} ${Python_LIBRARIES}) - ENDIF (NOT APPLE) + TARGET_LINK_LIBRARIES(${_logical_name} Python::Python) TARGET_LINK_LIBRARIES(${_logical_name} ${EXTRA_LINK_LIBRARIES}) - IF (APPLE) - SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") - ENDIF (APPLE) SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES PREFIX "" OUTPUT_NAME ${_child_module_name}) IF (WIN32) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index cc382b200afa..8522531c9e3b 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -65,46 +65,6 @@ add_subdirectory(ext-libs) add_subdirectory(testing) add_subdirectory(processing) -include_directories(SYSTEM - ${Python_INCLUDE_DIRS} - ${QT_QTCORE_INCLUDE_DIR} - ${QT_QTGUI_INCLUDE_DIR} - ${QT_QTNETWORK_INCLUDE_DIR} - ${QT_QTSERIALPORT_INCLUDE_DIR} - ${QT_QTSVG_INCLUDE_DIR} - ${QT_QTXML_INCLUDE_DIR} - ${QWT_INCLUDE_DIR} - ${QCA_INCLUDE_DIR} - ${QTKEYCHAIN_INCLUDE_DIR} - ${SPATIALINDEX_INCLUDE_DIR} -) - -if (${SIP_VERSION_STR} VERSION_LESS 5) - include_directories(SYSTEM - ${SIP_INCLUDE_DIR} - ) -endif() - -if (WITH_GUI) - include_directories(SYSTEM - ${QSCINTILLA_INCLUDE_DIR} - ) -endif() - -include_directories( - ${CMAKE_SOURCE_DIR}/src/plugins - - ${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h - ${CMAKE_BINARY_DIR}/src/ui - ${CMAKE_BINARY_DIR}/src/analysis -) - -if (WITH_GUI) - include_directories( - - ) -endif() - if(NOT ENABLE_TESTS) set(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} TESTS) endif() @@ -252,9 +212,6 @@ endif() # 3D module if (WITH_3D) - include_directories( - ${QT5_3DEXTRA_INCLUDE_DIR} - ) set(PY_MODULES ${PY_MODULES} 3d) file(GLOB_RECURSE sip_files_3d ${BINDING_FILES_ROOT_DIR}/3d/*.sip ${BINDING_FILES_ROOT_DIR}/3d/*.sip.in) diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 308027a94055..3323d3985f17 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -9,13 +9,6 @@ target_include_directories(qgispython PUBLIC ${CMAKE_SOURCE_DIR}/src/python ${CMAKE_BINARY_DIR}/src/python ) -target_include_directories(qgispython SYSTEM PRIVATE - ${Python_INCLUDE_DIRS} -) - -set_target_properties(qgispython PROPERTIES - CLEAN_DIRECT_OUTPUT 1 -) #generate unversioned libs for android if (NOT ANDROID) @@ -27,7 +20,7 @@ endif() target_link_libraries(qgispython qgis_core - ${Python_LIBRARIES} + Python::Python ${OPENPTY_LIBRARY} )