From fb9a73866d8264fd2457faa2449e768d363f0c91 Mon Sep 17 00:00:00 2001 From: TURX Date: Thu, 23 Jan 2020 02:34:28 +0800 Subject: add includedir support for cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 7144b0b..8f09ba8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ if(WIN32) src/windows/os-threads.cpp) endif() -set(p8-platform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/p8-platform") +set(p8-platform_INCLUDE_DIRS "${CMAKE_INSTALL_INCLUDEDIR}/p8-platform") IF(WIN32) LIST(APPEND p8-platform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/p8-platform/windows") ENDIF(WIN32) @@ -42,7 +42,7 @@ set_target_properties(p8-platform PROPERTIES VERSION ${p8-platform_VERSION_MAJOR SOVERSION ${p8-platform_VERSION_MAJOR}) install(TARGETS p8-platform DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(FILES src/os.h DESTINATION include/p8-platform) +install(FILES src/os.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/p8-platform) IF(WIN32) INSTALL(FILES src/windows/dlfcn-win32.h src/windows/os-socket.h @@ -53,23 +53,23 @@ ELSE(WIN32) install(FILES src/posix/os-socket.h src/posix/os-threads.h src/posix/os-types.h - DESTINATION include/p8-platform/posix) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/p8-platform/posix) ENDIF(WIN32) install(FILES src/sockets/cdevsocket.h src/sockets/socket.h src/sockets/tcp.h - DESTINATION include/p8-platform/sockets) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/p8-platform/sockets) install(FILES src/threads/atomics.h src/threads/mutex.h src/threads/threads.h - DESTINATION include/p8-platform/threads) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/p8-platform/threads) install(FILES src/util/atomic.h src/util/buffer.h src/util/StringUtils.h src/util/StdString.h src/util/timeutils.h src/util/util.h - DESTINATION include/p8-platform/util) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/p8-platform/util) IF(NOT WIN32) configure_file(p8-platform.pc.in p8-platform.pc @ONLY) diff --git a/p8-platform.pc.in b/p8-platform.pc.in index f97a2d4..611edb7 100644 --- a/p8-platform.pc.in +++ b/p8-platform.pc.in @@ -1,6 +1,6 @@ prefix=@CMAKE_INSTALL_PREFIX@ libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -includedir=@CMAKE_INSTALL_PREFIX@/include +includedir=@CMAKE_INSTALL_INCLUDEDIR@ DEPENDENCIES=@p8-platform_LIBRARIES@ Name: @p8-platform_NAME@ -- 2.37.3 From c34abe1d4c86660a8b62d041bacea12347624943 Mon Sep 17 00:00:00 2001 From: TURX Date: Thu, 23 Jan 2020 02:34:56 +0800 Subject: fix Haiku support diff --git a/src/posix/os-types.h b/src/posix/os-types.h index 7fb832c..dcb8a61 100644 --- a/src/posix/os-types.h +++ b/src/posix/os-types.h @@ -36,7 +36,7 @@ #include #include #include -#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__HAIKU__) #include #endif #include -- 2.37.3 From 16da42d05ffcd5518c32d65a16bc1270b7484a0b Mon Sep 17 00:00:00 2001 From: begasus Date: Fri, 7 Apr 2023 09:08:19 +0200 Subject: Set correct path for cmake configuration file diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f09ba8..084f851 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,5 +81,5 @@ ENDIF(NOT WIN32) configure_file (p8-platform-config.cmake.in p8-platform-config.cmake @ONLY) install(FILES ${CMAKE_BINARY_DIR}/p8-platform-config.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/p8-platform) + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/p8-platform) -- 2.37.3