Skip to content

Commit

Permalink
Only use Boost_INCLUDE_DIR if Boost was found. Prevents errors like:
Browse files Browse the repository at this point in the history
"CMake Error: The following variables are used in this project, but they are set to NOTFOUND."

..meaning Boost was less optional than it should be. This didn't seem to happen on Linux, only on OS X
  • Loading branch information
dbr committed Jan 15, 2011
1 parent 5733569 commit 9804eb0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/core/CMakeLists.txt
Expand Up @@ -6,9 +6,13 @@ include_directories(
${CMAKE_SOURCE_DIR}/export/
${CMAKE_BINARY_DIR}/export/
${YAML_CPP_INCLUDE_DIRS}
${Boost_INCLUDE_DIR}
)

if(Boost_FOUND)
include_directories(
${Boost_INCLUDE_DIR})
endif()

file(GLOB_RECURSE core_src_files "${CMAKE_SOURCE_DIR}/src/core/*.cpp")
file(GLOB_RECURSE core_export_headers "${CMAKE_SOURCE_DIR}/export/OpenColorIO/*.h")

Expand Down
6 changes: 5 additions & 1 deletion src/pyglue/CMakeLists.txt
Expand Up @@ -25,8 +25,12 @@ if(PYTHON_OK)
${PYTHON_INCLUDE}
${CMAKE_SOURCE_DIR}/export/
${CMAKE_BINARY_DIR}/export/
${Boost_INCLUDE_DIR}
)

if(Boost_FOUND)
include_directories(
${Boost_INCLUDE_DIR})
endif()

# Exclude the 'lib' prefix from the name.
if(NOT PYTHON_INCLUDE_LIB_PREFIX)
Expand Down
6 changes: 5 additions & 1 deletion src/testbed/CMakeLists.txt
Expand Up @@ -2,9 +2,13 @@
include_directories(
${CMAKE_SOURCE_DIR}/export/
${CMAKE_BINARY_DIR}/export/
${Boost_INCLUDE_DIR}
)

if(Boost_FOUND)
include_directories(
${Boost_INCLUDE_DIR})
endif()

add_executable(OpenColorIOTest
main.cpp
)
Expand Down

0 comments on commit 9804eb0

Please sign in to comment.