From bc96abce425216ec3cdfe11723d5d47787ea6fd6 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sat, 12 May 2012 14:09:40 -0700 Subject: [PATCH] Patch for building examples on MacOS X Lion I had trouble with CMake picking up my /opt/local/include directory before my libftdi/src directory. I was getting the MacPorts-installed libftdi-0.20 headers, not the headers from the build tree. This was only happening during building of examples/. This patch addressed my problem. - Jared --- examples/CMakeLists.txt | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 69530a4..bc35229 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -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) -- 1.7.1