cmake: Allow project-wide includes for third-party components
authorMartin Fleisz <mfleisz@thinstuff.com>
Thu, 4 Apr 2013 10:28:52 +0000 (12:28 +0200)
committerMartin Fleisz <mfleisz@thinstuff.com>
Thu, 4 Apr 2013 10:28:52 +0000 (12:28 +0200)
CMakeLists.txt
third-party/CMakeLists.txt

index 3178dee..3c9920a 100644 (file)
@@ -420,6 +420,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)
@@ -440,10 +447,6 @@ if(WITH_SERVER)
        add_subdirectory(server)
 endif()
 
-if(WITH_THIRD_PARTY)
-       add_subdirectory(third-party)
-endif()
-
 # Packaging
 
 SET(CPACK_BINARY_ZIP "ON")
index 07bc7f8..09b1fd4 100644 (file)
@@ -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