fix cmake in case the boostlibs don't contain boost_python3 yet

This commit is contained in:
Jens Verwiebe 2012-09-24 19:53:33 +00:00
parent 33d7a1bbeb
commit 71a3339032
1 changed files with 30 additions and 8 deletions

View File

@ -647,7 +647,11 @@ if(UNIX AND NOT APPLE)
else()
set(Boost_USE_MULTITHREADED ON)
endif()
find_package(Boost 1.34 COMPONENTS filesystem python3 regex system thread)
if(WITH_CYCLES_OSL)
find_package(Boost 1.34 COMPONENTS filesystem python3 regex system thread) # osl_nodes uses boost_python
else()
find_package(Boost 1.34 COMPONENTS filesystem regex system thread)
endif()
mark_as_advanced(Boost_DIR) # why doesnt boost do this?
endif()
@ -1079,11 +1083,18 @@ elseif(WIN32)
endif()
set(BOOST_LIBRARIES
optimized libboost_date_time-${BOOST_POSTFIX} optimized libboost_filesystem-${BOOST_POSTFIX}
optimized libboost_python3-${BOOST_POSTFIX} optimized libboost_regex-${BOOST_POSTFIX}
optimized libboost_regex-${BOOST_POSTFIX}
optimized libboost_system-${BOOST_POSTFIX} optimized libboost_thread-${BOOST_POSTFIX}
if(WITH_CYCLES_OSL)
optimized libboost_python3-${BOOST_POSTFIX}
endif(WITH_CYCLES_OSL)
debug libboost_date_time-${BOOST_DEBUG_POSTFIX} debug libboost_filesystem-${BOOST_DEBUG_POSTFIX}
debug libboost_python3-${BOOST_DEBUG_POSTFIX} debug libboost_regex-${BOOST_DEBUG_POSTFIX}
debug libboost_system-${BOOST_DEBUG_POSTFIX} debug libboost_thread-${BOOST_DEBUG_POSTFIX})
debug libboost_regex-${BOOST_DEBUG_POSTFIX}
debug libboost_system-${BOOST_DEBUG_POSTFIX} debug libboost_thread-${BOOST_DEBUG_POSTFIX}
if(WITH_CYCLES_OSL)
debug libboost_python3-${BOOST_DEBUG_POSTFIX}
endif(WITH_CYCLES_OSL)
)
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
endif()
@ -1259,11 +1270,18 @@ elseif(WIN32)
endif()
set(BOOST_LIBRARIES
optimized boost_date_time-${BOOST_POSTFIX} boost_filesystem-${BOOST_POSTFIX}
boost_python3-${BOOST_POSTFIX} boost_regex-${BOOST_POSTFIX}
boost_regex-${BOOST_POSTFIX}
boost_system-${BOOST_POSTFIX} boost_thread-${BOOST_POSTFIX}
if(WITH_CYCLES_OSL)
boost_python3-${BOOST_POSTFIX}
endf(WITH_CYCLES_OSL)
debug boost_date_time-${BOOST_DEBUG_POSTFIX} boost_filesystem-${BOOST_DEBUG_POSTFIX}
boost_python3-${BOOST_POSTFIX} boost_regex-${BOOST_DEBUG_POSTFIX}
boost_system-${BOOST_DEBUG_POSTFIX} boost_thread-${BOOST_DEBUG_POSTFIX})
boost_regex-${BOOST_DEBUG_POSTFIX}
boost_system-${BOOST_DEBUG_POSTFIX} boost_thread-${BOOST_DEBUG_POSTFIX}
if(WITH_CYCLES_OSL)
boost_python3-${BOOST_POSTFIX}
endif(WITH_CYCLES_OSL)
)
set(BOOST_LIBPATH ${BOOST}/lib)
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB -DBOOST_THREAD_USE_LIB ")
endif()
@ -1517,7 +1535,11 @@ elseif(APPLE)
if(WITH_BOOST)
set(BOOST ${LIBDIR}/boost)
set(BOOST_INCLUDE_DIR ${BOOST}/include)
set(BOOST_LIBRARIES boost_date_time-mt boost_filesystem-mt boost_python3-mt boost_regex-mt boost_system-mt boost_thread-mt)
if(WITH_CYCLES_OSL)
set(BOOST_LIBRARIES boost_date_time-mt boost_filesystem-mt boost_python3-mt boost_regex-mt boost_system-mt boost_thread-mt)
else(WITH_CYCLES_OSL)
set(BOOST_LIBRARIES boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt)
endif(WITH_CYCLES_OSL)
set(BOOST_LIBPATH ${BOOST}/lib)
set(BOOST_DEFINITIONS)
endif()