fix cmake in case the boostlibs don't contain boost_python3 yet
authorJens Verwiebe <info@jensverwiebe.de>
Mon, 24 Sep 2012 19:53:33 +0000 (19:53 +0000)
committerJens Verwiebe <info@jensverwiebe.de>
Mon, 24 Sep 2012 19:53:33 +0000 (19:53 +0000)
CMakeLists.txt

index e6402cc..8161a43 100644 (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()