Skip to content

Commit

Permalink
Merge pull request #5 from justsz/add-cmake-install
Browse files Browse the repository at this point in the history
Add install instructions to cmake rules
  • Loading branch information
Nicholaswogan authored Jan 12, 2023
2 parents add07bb + 690b601 commit 98a045c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand All @@ -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()
endif()

install(TARGETS yaml libyaml_interface fortran-yaml-c DESTINATION lib)
install(DIRECTORY ${CMAKE_BINARY_DIR}/modules DESTINATION .)

0 comments on commit 98a045c

Please sign in to comment.