-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
As stated in the README.md
Lines 134 to 137 in a012a4d
| using the Intel Fortran Compiler, gfortran 4.9, and NAG Fortran 6.0. It does also work on Windows (but note that the Visual Studio project it generates is not quite the same as the one mentioned above). This CMake based build provides an install target, | |
| and exports from both the install location and the build location so | |
| that building and using JSON-Fortran in another CMake based project is | |
| trivial. To get started with the CMake based build, set the |
the CMake build tree should be accessible for importing the JSON-Fortran library into another CMake-based project.
However, this does not seem to work, because the jsonfortran-gnu-targets.cmake file is generated in the ${PROJECT_BINARY_DIR}/packaging directory instead of simply being in ${PROJECT_BINARY_DIR}.
The problem can be solved by replacing lines
json-fortran/packaging/CMakeLists.txt
Lines 26 to 29 in cde2620
| #---------------------------------------------- | |
| # Make build tree targets accessible for import | |
| #---------------------------------------------- | |
| export ( TARGETS ${LIB_NAME} ${LIB_NAME}-static FILE ${PACKAGE_NAME}-targets.cmake ) |
with
export ( EXPORT ${PACKAGE_NAME}-targets
NAMESPACE ${PACKAGE_NAME}::
FILE ${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-targets.cmake )Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels