From f58f553e9804fa9422de79f5e1607d8e366de7be Mon Sep 17 00:00:00 2001 From: Sumedha Widyadharma Date: Sun, 23 Oct 2016 15:56:18 +0200 Subject: Set build_interface directories for integrated builds This makes it very easy to integrate entityx into a build. I.e: add_subdirectories(3rdparty/entityx) target_link_libraries(my_target entityx[_shared]) This makes #include entityx/entityx.h just work. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 116b137..ba38a87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,11 +143,15 @@ if (ENTITYX_BUILD_SHARED) VERSION ${ENTITYX_VERSION} SOVERSION ${ENTITYX_MAJOR_VERSION} FOLDER entityx) - set(install_libs entityx_shared) + set(install_libs entityx_shared) + set_property(TARGET entityx_shared APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES + $) else() add_library(entityx STATIC ${sources}) set_target_properties(entityx PROPERTIES DEBUG_POSTFIX -d FOLDER entityx) set(install_libs entityx) + set_property(TARGET entityx APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES + $) endif (ENTITYX_BUILD_SHARED) if (ENTITYX_BUILD_TESTING) -- cgit v1.2.3