diff --git a/CMakeLists.txt b/CMakeLists.txt index 49b486c0..3d0cd6f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -242,23 +242,25 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") target_compile_options(ixwebsocket PRIVATE /MP) endif() +include(GNUInstallDirs) + target_include_directories(ixwebsocket PUBLIC $ - $ + $ ) set_target_properties(ixwebsocket PROPERTIES PUBLIC_HEADER "${IXWEBSOCKET_HEADERS}") install(TARGETS ixwebsocket EXPORT ixwebsocket - ARCHIVE DESTINATION lib - PUBLIC_HEADER DESTINATION include/ixwebsocket/ + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ixwebsocket/ ) install(EXPORT ixwebsocket FILE ixwebsocket-config.cmake NAMESPACE ixwebsocket:: - DESTINATION lib/cmake/ixwebsocket) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ixwebsocket) if (USE_WS OR USE_TEST) include(FetchContent)