Patch for building examples on MacOS X Lion
[libftdi] / examples / CMakeLists.txt
index 69530a4..bc35229 100644 (file)
@@ -8,9 +8,6 @@ if (EXAMPLES)
 
     message(STATUS "Building example programs.")
 
-    # Source includes
-    include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src)
-
     # Targets
     add_executable(simple simple.c)
     add_executable(bitbang bitbang.c)
@@ -42,6 +39,10 @@ if (EXAMPLES)
         # Linkage
         target_link_libraries(find_all_pp ftdipp)
     endif(FTDI_BUILD_CPP)
+
+    # Source includes
+    include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src)
+
 else(EXAMPLES)
     message(STATUS "Not building example programs.")
 endif(EXAMPLES)