diff options
author | LAK132 <lakridesagain@gmail.com> | 2022-08-16 20:14:43 +0930 |
---|---|---|
committer | LAK132 <lakridesagain@gmail.com> | 2022-08-17 01:07:14 +0930 |
commit | ae8966040bc7f148958d4ac0b989e04059b6ba06 (patch) | |
tree | 1051b191a1d1d65e60accc08686d1af6c231adee | |
parent | b9b16eaa5358dbdf15368eb145be2c70b72c42a9 (diff) | |
download | nextpnr-ae8966040bc7f148958d4ac0b989e04059b6ba06.tar.gz nextpnr-ae8966040bc7f148958d4ac0b989e04059b6ba06.tar.bz2 nextpnr-ae8966040bc7f148958d4ac0b989e04059b6ba06.zip |
Replace deprecated method of finding Python 3
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3812f7dc..269e90eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,10 +173,10 @@ if (BUILD_GUI) set(CMAKE_ENABLE_EXPORTS ON) endif() -find_package(PythonInterp 3.5 REQUIRED) +find_package(Python3 3.5 REQUIRED COMPONENTS Interpreter) if (BUILD_PYTHON) # TODO: sensible minimum Python version - find_package(PythonLibs 3.5 REQUIRED) + find_package(Python3 3.5 REQUIRED COMPONENTS Development) else() add_definitions("-DNO_PYTHON") endif() @@ -221,7 +221,7 @@ if (NOT DEFINED PYBIND11_INCLUDE_DIR) set(PYBIND11_INCLUDE_DIR "3rdparty/pybind11/include") endif() -include_directories(common/kernel/ common/place/ common/route/ json/ frontend/ 3rdparty/json11/ ${PYBIND11_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}) +include_directories(common/kernel/ common/place/ common/route/ json/ frontend/ 3rdparty/json11/ ${PYBIND11_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}) if(BUILD_HEAP) find_package (Eigen3 REQUIRED NO_MODULE) @@ -339,7 +339,7 @@ foreach (family ${ARCH}) target_link_libraries(${target} LINK_PUBLIC gui_${family} ${GUI_LIBRARY_FILES_${ufamily}}) endif() if (BUILD_PYTHON) - target_link_libraries(${target} LINK_PUBLIC ${PYTHON_LIBRARIES}) + target_link_libraries(${target} LINK_PUBLIC ${Python3_LIBRARIES}) if (STATIC_BUILD) target_link_libraries(${target} LINK_PUBLIC ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} ${ZLIB_LIBRARIES} ${EXPAT_LIBRARIES}) if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |