-
-
Notifications
You must be signed in to change notification settings - Fork 278
Problems linking to installed preCICE static library via CMake #677
Copy link
Copy link
Closed
Milestone
Description
I'm trying to link to static preCICE via target_link_libraries(myTarget PRIVATE precice::precice), but it does not work for me. Instead, I must manually import all the preCICE’s dependencies:
find_package(precice REQUIRED CONFIG)
set(Boost_USE_STATIC_LIBS ON)
find_package (Boost REQUIRED COMPONENTS system program_options filesystem log log_setup thread unit_test_framework)
find_package (Eigen3 REQUIRED NO_MODULE)
And then:
target_link_libraries (${PROJECT_NAME}
PRIVATE
precice::precice
Eigen3::Eigen
Boost::boost
Boost::filesystem
Boost::program_options
Boost::system
Boost::log
Boost::log_setup
Boost::thread
Boost::unit_test_framework
)
And then still it wont work, because JSON and prettyprint are not found…
/usr/bin/ld: cannot find -lJSON
/usr/bin/ld: cannot find -lprettyprint
If this is needed, not renaming nlohmann_json to JSON could help, so people can use their system wide lib. And/or copy externally used json/printing libraries when make install.
System: Arch OS using newest CMake, preCICE, Eigen3, Boost, etc.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels