Change install location of OS abstraction files to a subdirectory of ddsc

This patch puts all installed include files under PREFIX/include/ddsc so we no longer create a /usr/local/include/os directory in a default installation.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2018-07-08 10:23:09 +02:00
parent b13bbcc358
commit 890af34168
4 changed files with 7 additions and 8 deletions

View file

@ -35,7 +35,6 @@ target_sources(OSAPI PRIVATE "include/os/os_project.h")
target_include_directories(OSAPI target_include_directories(OSAPI
PUBLIC PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include/>") "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include/>")
# "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
if(BUILD_TESTING) if(BUILD_TESTING)
add_subdirectory(tests) add_subdirectory(tests)
@ -43,19 +42,19 @@ endif()
install( install(
FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/os/os_public.h" "${CMAKE_CURRENT_SOURCE_DIR}/include/os/os_decl_attributes.h" "${CMAKE_CURRENT_SOURCE_DIR}/include/os/os_decl_attributes_sal.h" FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/os/os_public.h" "${CMAKE_CURRENT_SOURCE_DIR}/include/os/os_decl_attributes.h" "${CMAKE_CURRENT_SOURCE_DIR}/include/os/os_decl_attributes_sal.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/os" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ddsc/os"
COMPONENT dev) COMPONENT dev)
# Currently, only windows and posix platforms are supported. # Currently, only windows and posix platforms are supported.
IF(WIN32 AND NOT UNIX) IF(WIN32 AND NOT UNIX)
install( install(
FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/os/windows/os_platform_public.h" FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/os/windows/os_platform_public.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/os" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ddsc/os"
COMPONENT dev) COMPONENT dev)
ELSE() ELSE()
install( install(
FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/os/posix/os_platform_public.h" FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/os/posix/os_platform_public.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/os" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ddsc/os"
COMPONENT dev) COMPONENT dev)
ENDIF() ENDIF()

View file

@ -123,7 +123,7 @@
# endif # endif
#endif #endif
#include "os/os_decl_attributes_sal.h" #include "os_decl_attributes_sal.h"
#undef OS_GNUC_VERSION #undef OS_GNUC_VERSION
#endif #endif

View file

@ -13,7 +13,7 @@
#define OS_PUBLIC_H #define OS_PUBLIC_H
#include <stddef.h> #include <stddef.h>
#include "os/os_platform_public.h" #include "os_platform_public.h"
#include "os/os_decl_attributes.h" #include "os_decl_attributes.h"
#endif #endif

View file

@ -12,7 +12,7 @@
#ifndef OS_PLATFORM_THREAD_H #ifndef OS_PLATFORM_THREAD_H
#define OS_PLATFORM_THREAD_H #define OS_PLATFORM_THREAD_H
#include "os/os_defs.h" #include "os_defs.h"
#if defined (__cplusplus) #if defined (__cplusplus)
extern "C" { extern "C" {