tudat-team / tudatpy

A Python platform to perform astrodynamics and space research.

Home Page:https://tudat-space.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CMake: "NRLMSISE00::nrlmsise00" target was not found.

jo11he opened this issue · comments

Configuring the tudatpy build with the -DTUDAT_BUILD_WITH_NRLMSISE00=ON Cmake option gives a

Target "kernel" links to target "NRLMSISE00::nrlmsise00" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

warning in the configuration output, which eventually leads to a

ld: library not found for -lNRLMSISE00::nrlmsise00 clang-11: error: linker command failed with exit code 1 (use -v to see invocation)

Error during the build.

Issue can be avoided by reducing this code block in the tudatpy CMakeLists.txt to this single line.

commented

I had to roll those changes back to the original block (i.e. reverting the changes done in 0ff7d0f) for it to compile. Without doing so, it would fail to find the NRLMSISE00 package:

CMake Error at tudatpy/CMakeLists.txt:114 (find_package):
  By not providing "FindNRLMSISE00.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "NRLMSISE00", but CMake did not find one.

  Could not find a package configuration file provided by "NRLMSISE00"
  (requested version 0.1) with any of the following names:

    NRLMSISE00Config.cmake
    nrlmsise00-config.cmake

  Add the installation prefix of "NRLMSISE00" to CMAKE_PREFIX_PATH or set
  "NRLMSISE00_DIR" to a directory containing one of the above files.  If
  "NRLMSISE00" provides a separate development package or SDK, be sure it has
  been installed.

I was attempting to compile on osx-arm64, which may thus be the issue.