CMake: Modernize build files using outdated Python variables.

This commit is contained in:
Joao Matos
2025-02-15 20:04:22 +00:00
committed by Chris Hennes
parent de9bd5e1ce
commit 27ebc68a11
72 changed files with 113 additions and 124 deletions

View File

@@ -2,7 +2,7 @@
include_directories(
${Boost_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${Python3_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${XercesC_INCLUDE_DIRS}
)

View File

@@ -5,7 +5,7 @@ include_directories(
${Boost_INCLUDE_DIRS}
${COIN3D_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${Python3_INCLUDE_DIRS}
${XercesC_INCLUDE_DIRS}
)

View File

@@ -13,12 +13,12 @@ find_package(Boost COMPONENTS signals REQUIRED)
# Python
find_package(PythonInterp REQUIRED)
set(Python_ADDITIONAL_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
IF (NOT DEFINED PYTHON_VERSION_STRING)
set(Python_ADDITIONAL_VERSIONS ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR})
IF (NOT DEFINED Python3_VERSION)
find_package(PythonLibs REQUIRED)
ELSE (NOT DEFINED PYTHON_VERSION_STRING)
find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT)
ENDIF(NOT DEFINED PYTHON_VERSION_STRING)
ELSE (NOT DEFINED Python3_VERSION)
find_package(PythonLibs ${Python3_VERSION} EXACT)
ENDIF(NOT DEFINED Python3_VERSION)
# FreeCAD
set(FREECAD_SRC_DIR ${CMAKE_SOURCE_DIR}/../../../.. CACHE PATH "FreeCAD sources")
@@ -32,7 +32,7 @@ add_definitions(-DBOOST_ALL_DYN_LINK)
include_directories(
${Boost_INCLUDE_DIRS}
#${COIN3D_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
${Python3_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
@@ -52,7 +52,7 @@ set(MyPlugin_SRCS
set(MyPlugin_LIBS
${Boost_LIBRARIES}
#${COIN3D_LIBRARIES}
${PYTHON_LIBRARIES}
${Python3_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Widgets_LIBRARIES}
@@ -70,7 +70,7 @@ set(FreeCADPlugin_SRCS
set(FreeCADPlugin_LIBS
${Boost_LIBRARIES}
#${COIN3D_LIBRARIES}
${PYTHON_LIBRARIES}
${Python3_LIBRARIES}
${Qt5Core_LIBRARIES}
${Qt5Gui_LIBRARIES}
${Qt5Widgets_LIBRARIES}