diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f8a9b4f..7444e8a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,5 @@ +set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + add_library(libyaml_interface libyaml_interface.c) target_link_libraries(libyaml_interface yaml) @@ -13,4 +15,8 @@ if ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU") if (CMAKE_BUILD_TYPE STREQUAL "Debug") target_compile_options(fortran-yaml-c PRIVATE -Wunused -fcheck=all) endif() -endif() \ No newline at end of file +endif() + +install(TARGETS yaml libyaml_interface fortran-yaml-c DESTINATION lib) +install(DIRECTORY ${CMAKE_BINARY_DIR}/modules DESTINATION .) +