From 4ce1625b8ae22a4e0030f07d80360e25ae558a1e Mon Sep 17 00:00:00 2001 From: Michael Keck Date: Wed, 24 Apr 2024 07:43:23 +0200 Subject: [PATCH] CMake: Improve install instructions (#244) --- CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61cef93..2398ccc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,10 +98,12 @@ if (WIN32) target_link_libraries(enet winmm ws2_32) endif() +include(GNUInstallDirs) install(TARGETS enet - RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib/static - LIBRARY DESTINATION lib) - -install(DIRECTORY include/ - DESTINATION include) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/enet + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +)