aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Callaghan <dcallagh@google.com>2023-01-24 13:11:50 +1100
committerDan Callaghan <dcallagh@google.com>2023-01-24 13:11:50 +1100
commit4c7e805f183ae74384737fb7caf7f7c13969bafb (patch)
treef2739edb8633f601a1529cc9cbd3b4a277ec3084
parent985c688bf6062553fafcfad386fa724b5e956302 (diff)
downloadnextpnr-4c7e805f183ae74384737fb7caf7f7c13969bafb.tar.gz
nextpnr-4c7e805f183ae74384737fb7caf7f7c13969bafb.tar.bz2
nextpnr-4c7e805f183ae74384737fb7caf7f7c13969bafb.zip
use eigen as an IMPORTED target in CMake
Eigen considers the EIGEN3_INCLUDE_DIRS and EIGEN3_DEFINITIONS variables to be deprecated and they will no longer be exported in the next release after 3.4.0: https://gitlab.com/libeigen/eigen/-/commit/f2984cd0778dd0a1d7e74216d826eaff2bc6bfab Use the IMPORTED target instead, which seems to be the preferred way of consuming third-party CMake libraries.
-rw-r--r--CMakeLists.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 269e90eb..4d15f724 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -225,8 +225,7 @@ include_directories(common/kernel/ common/place/ common/route/ json/ frontend/ 3
if(BUILD_HEAP)
find_package (Eigen3 REQUIRED NO_MODULE)
- include_directories(${EIGEN3_INCLUDE_DIRS})
- add_definitions(${EIGEN3_DEFINITIONS})
+ link_libraries(Eigen3::Eigen)
add_definitions(-DWITH_HEAP)
endif()