From 35274b3de3fcb57b737481b99b6c7ee2fd6d9242 Mon Sep 17 00:00:00 2001 From: Justs Zarins Date: Tue, 25 Oct 2022 13:14:36 +0100 Subject: [PATCH 1/3] Add library install options for cmake --- src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f8a9b4f..b217557 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,4 +13,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 libyaml_interface fortran-yaml-c DESTINATION lib) +install(DIRECTORY ${CMAKE_BINARY_DIR}/modules DESTINATION .) + From 848d4bc8208524963ef0c223662fbc4b615d7655 Mon Sep 17 00:00:00 2001 From: Justs Zarins Date: Wed, 2 Nov 2022 16:18:28 +0000 Subject: [PATCH 2/3] Add libyaml to install instruction --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b217557..df610a2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,6 +15,6 @@ if ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU") endif() endif() -install(TARGETS libyaml_interface fortran-yaml-c DESTINATION lib) +install(TARGETS yaml libyaml_interface fortran-yaml-c DESTINATION lib) install(DIRECTORY ${CMAKE_BINARY_DIR}/modules DESTINATION .) From 690b6015476ad126ff381e130b8f0857b2082053 Mon Sep 17 00:00:00 2001 From: Justs Zarins Date: Thu, 3 Nov 2022 16:50:37 +0000 Subject: [PATCH 3/3] Add RPATH to lib installation --- src/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index df610a2..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)