From: Sumedha Widyadharma Date: Sun, 23 Oct 2016 13:56:18 +0000 (+0200) Subject: Set build_interface directories for integrated builds X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=f58f553e9804fa9422de79f5e1607d8e366de7be;p=clyne%2Fentityx.git 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. --- 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)