diff --git a/CMakeLists.txt b/CMakeLists.txt index bd22f7aa8..49099d725 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -421,6 +421,13 @@ endif() # Sub-directories +if(WITH_THIRD_PARTY) + add_subdirectory(third-party) + if (NOT "${THIRD_PARTY_INCLUDES}" STREQUAL "") + include_directories(${THIRD_PARTY_INCLUDES}) + endif() +endif() + add_subdirectory(include) add_subdirectory(libfreerdp) @@ -441,10 +448,6 @@ if(WITH_SERVER) add_subdirectory(server) endif() -if(WITH_THIRD_PARTY) - add_subdirectory(third-party) -endif() - # Packaging SET(CPACK_BINARY_ZIP "ON") diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index 07bc7f806..09b1fd46e 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -29,3 +29,4 @@ foreach(dir ${all_valid_subdirs}) endif() endforeach(dir) +set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE) \ No newline at end of file