Skip to content

Commit

Permalink
Add installation rules and update .gitignore for build files
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerFarukBOUN committed Nov 17, 2024
1 parent fe1dac3 commit eabcceb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@
*.exe
*.out
*.app

# Build files
build/
26 changes: 26 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,29 @@ ENDIF()
IF(ENABLE_RVSTD_XT)
ADD_SUBDIRECTORY(xt)
ENDIF()

# Install

INCLUDE(GNUInstallDirs)

INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

INSTALL(
TARGETS rvstd
EXPORT rvstd-config
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

EXPORT(
TARGETS rvstd
NAMESPACE rvstd::
FILE "${CMAKE_CURRENT_BINARY_DIR}/rvstd-config.cmake"
)

INSTALL(
EXPORT rvstd-config
DESTINATION "${CMAKE_INSTALL_DATADIR}/rvstd/cmake"
NAMESPACE rvstd::)

0 comments on commit eabcceb

Please sign in to comment.