CMake: Force to include own boost before system
<p>I've tried several ways and read quite some questions on SO, but still can't get my own boost get included before the one in /usr/include.</p>

<p>I'm using Ubuntu 14.04 btw. </p>

<pre><code>BOOST_ROOT="${CMAKE_CURRENT_SOURCE_DIR}/Libraries/hdm-boost-lib" \ 
BOOST_INCLUDE_DIRS="${CMAKE_CURRENT_SOURCE_DIR}/Libraries/hdm-boost-lib/include" \
Boost_NO_BOOST_CMAKE=TRUE \
Boost_NO_SYSTEM_PATHS=TRUE \
Boost_LIBRARY_DIRS="${CMAKE_CURRENT_SOURCE_DIR}/Libraries/hdm-boost-lib/lib" \
    cmake -D CMAKE_BUILD_TYPE=Release \
    -DBoost_NO_BOOST_CMAKE=TRUE \
    -DBoost_NO_SYSTEM_PATHS=TRUE \
    -DBoost_LIBRARY_DIRS:FILEPATH="${CMAKE_CURRENT_SOURCE_DIR}/Libraries/hdm-boost-lib/lib" \
    .
</code></pre>

<p>And this is my CMakeLists.txt</p>

<pre><code># set (CMAKE_CXX_STANDARD 11)

set(CMAKE_CXX_FLAGS "-O2 -std=c++11 -Wall ${CMAKE_CXX_FLAGS}")

set (CMAKE_PREFIX_PATH "/opt/hdm")

set( serializer_SRC
   main.cpp Serializer.cpp
)

add_executable(cadmiral-serializer ${serializer_SRC}) 

set(BOOST_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../Libraries/hdm-boost-lib")
set(BOOST_INCLUDE_DIRS "${BOOST_ROOT}/include")
set(BOOST_LIBRARY_DIRS "${BOOST_ROOT}/lib")
#find_package(Boost REQUIRED regex date_time system filesystem thread graph program_options)

#find_package(geos)
#find_package(gdal)

include_directories(
    "${CMAKE_CURRENT_SOURCE_DIR}/../Libraries/hdm-geo-common/hdm-geo-common/include"
    "${BOOST_INCLUDE_DIRS}"
    "${CMAKE_CURRENT_SOURCE_DIR}/../Libraries/hdm-geo-common/hdm-geo-common/include"
    /opt/hdm/include
    "${CMAKE_CURRENT_SOURCE_DIR}/../Libraries/hdm-boost-lib/include"
)

#find_library(GDAL_LIB libgdal /opt/hdm/gdal/lib)
#find_library(GEOS_LIB libgeos /opt/hdm/geos/lib)

target_link_libraries(cadmiral-serializer 
    "${CMAKE_CURRENT_SOURCE_DIR}/../Libraries/hdm-geo-common/hdm-geo-common/libhdm_geo_common.a"
    /opt/hdm/geos/lib/libgeos.so
    /opt/hdm/gdal/lib/libgdal.so
    #${GEOS_LIB}
    #${GDAL_LIB}
)
</code></pre>

<p>How can I force my own headers in Libraries/hdm-boost-lib/include?</p>