mutationpp / Mutationpp

The MUlticomponent Thermodynamic And Transport library for IONized gases in C++
GNU Lesser General Public License v3.0
103 stars 58 forks source link

Fortran interface install destination undefined when using CMake command line #191

Closed mgoodson-cvd closed 2 years ago

mgoodson-cvd commented 2 years ago

Using CMake via the command-line to build the Fortran wrapper, e.g., cmake -DBUILD_FORTRAN_WRAPPER="TRUE" results in an error. This is because INSTALL_LIB_DIR and INSTALL_INCLUDE_DIR variables are undefined when the Fortran interface CMakeLists is parsed, via the add_subdirectory call here. The INSTALL_LIB_DIR and INSTALL_INCLUDE_DIR variables are not defined until later in the main CMakeLists.txt, here.

This can be resolved by adding the Fortran subdirectory after these variables are defined.