CMake: Modernize build files using outdated Python variables.
This commit is contained in:
@@ -15,7 +15,7 @@ include_directories(
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${OCC_INCLUDE_DIR}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${Python3_INCLUDE_DIRS}
|
||||
${SMESH_INCLUDE_DIR}
|
||||
${VTK_INCLUDE_DIRS}
|
||||
${EIGEN3_INCLUDE_DIR}
|
||||
@@ -109,7 +109,7 @@ if (BUILD_FLAT_MESH)
|
||||
|
||||
add_library(flatmesh SHARED ${FLATMESH_SRCS})
|
||||
SET_PYTHON_PREFIX_SUFFIX(flatmesh)
|
||||
target_link_libraries(flatmesh ${PYTHON_LIBRARIES} ${MeshPart_LIBS})
|
||||
target_link_libraries(flatmesh ${Python3_LIBRARIES} ${MeshPart_LIBS})
|
||||
|
||||
SET_BIN_DIR(flatmesh flatmesh /Mod/MeshPart)
|
||||
install(TARGETS flatmesh DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
@@ -120,14 +120,14 @@ if (BUILD_FLAT_MESH)
|
||||
if (FORCE_BOOST_PY_SUFFIX)
|
||||
set(BOOST_PY_SUFFIX ${FORCE_BOOST_PY_SUFFIX})
|
||||
else ()
|
||||
set(BOOST_PY_SUFFIX ${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
|
||||
set(BOOST_PY_SUFFIX ${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
|
||||
endif ()
|
||||
|
||||
find_package( Boost COMPONENTS python${BOOST_PY_SUFFIX} )
|
||||
if (NOT Boost_PYTHON${BOOST_PY_SUFFIX}_FOUND)
|
||||
# try just the major version
|
||||
find_package( Boost COMPONENTS python${PYTHON_VERSION_MAJOR} )
|
||||
if (NOT Boost_PYTHON${PYTHON_VERSION_MAJOR}_FOUND)
|
||||
find_package( Boost COMPONENTS python${Python3_VERSION_MAJOR} )
|
||||
if (NOT Boost_PYTHON${Python3_VERSION_MAJOR}_FOUND)
|
||||
# unversioned
|
||||
find_package( Boost COMPONENTS python REQUIRED)
|
||||
endif()
|
||||
@@ -150,7 +150,7 @@ if (BUILD_FLAT_MESH)
|
||||
SET_PYTHON_PREFIX_SUFFIX(flatmesh)
|
||||
|
||||
if (BUILD_DYNAMIC_LINK_PYTHON)
|
||||
target_link_libraries(flatmesh ${PYTHON_LIBRARIES})
|
||||
target_link_libraries(flatmesh ${Python3_LIBRARIES})
|
||||
endif(BUILD_DYNAMIC_LINK_PYTHON)
|
||||
|
||||
target_link_libraries(flatmesh ${MeshPart_LIBS} ${Boost_LIBRARIES})
|
||||
|
||||
@@ -17,7 +17,7 @@ include_directories(
|
||||
${OCC_INCLUDE_DIR}
|
||||
${COIN3D_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${Python3_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
|
||||
Reference in New Issue
Block a user