Commit: 8df2d1c6b61e97534ae527b8c7bfc44ac9ee1d3c
Author: Juergen Herrmann
Date:   Mon Feb 24 17:53:14 2014 +0100
https://developer.blender.org/rB8df2d1c6b61e97534ae527b8c7bfc44ac9ee1d3c

Minor changes to CMakeLists.txt to enable debug builds on VS2013.
Fix for finding LLVM and OSL debug libs.

===================================================================

M       CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 169aeff..5365c93 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1290,7 +1290,27 @@ elseif(WIN32)
 
                if(WITH_LLVM)
                        set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH    "Path 
to the LLVM installation")
-                       file(GLOB LLVM_LIBRARY ${LLVM_DIRECTORY}/lib/*.lib)
+                       file(GLOB LLVM_LIBRARY_OPTIMIZED 
${LLVM_DIRECTORY}/lib/*.lib)
+
+                       if(EXISTS ${LLVM_DIRECTORY}/debug/lib)
+                               foreach(LLVM_OPTIMIZED_LIB 
${LLVM_LIBRARY_OPTIMIZED})
+                                       get_filename_component(LIBNAME 
${LLVM_OPTIMIZED_LIB} ABSOLUTE)
+                                       list(APPEND LLVM_LIBS optimized 
${LIBNAME})
+                               endforeach(LLVM_OPTIMIZED_LIB)
+                       
+                               file(GLOB LLVM_LIBRARY_DEBUG 
${LLVM_DIRECTORY}/debug/lib/*.lib)
+
+                               foreach(LLVM_DEBUG_LIB ${LLVM_LIBRARY_DEBUG})
+                                       get_filename_component(LIBNAME 
${LLVM_DEBUG_LIB} ABSOLUTE)
+                                       list(APPEND LLVM_LIBS debug ${LIBNAME})
+                               endforeach(LLVM_DEBUG_LIB)
+
+                               set(LLVM_LIBRARY ${LLVM_LIBS})
+                       else()
+                               message(WARNING "LLVM debug libs not present on 
this system. Using release libs for debug builds.")
+                               set(LLVM_LIBRARY ${LLVM_LIBRARY_OPTIMIZED})
+                       endif()
+                       
                endif()
        
                if(WITH_OPENCOLORIO)
@@ -1579,7 +1599,10 @@ elseif(WIN32)
                find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
                find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
                find_library(OSL_LIB_QUERY NAMES oslquery PATHS 
${CYCLES_OSL}/lib)
-               list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} ${OSL_LIB_EXEC} 
${OSL_LIB_QUERY})
+               find_library(OSL_LIB_EXEC_DEBUG NAMES oslexec_d PATHS 
${CYCLES_OSL}/lib)
+               find_library(OSL_LIB_COMP_DEBUG NAMES oslcomp_d PATHS 
${CYCLES_OSL}/lib)
+               find_library(OSL_LIB_QUERY_DEBUG NAMES oslquery_d PATHS 
${CYCLES_OSL}/lib)
+               list(APPEND OSL_LIBRARIES optimized ${OSL_LIB_COMP} optimized 
${OSL_LIB_EXEC} optimized ${OSL_LIB_QUERY} debug ${OSL_LIB_EXEC_DEBUG} debug 
${OSL_LIB_COMP_DEBUG} debug ${OSL_LIB_QUERY_DEBUG})
                find_path(OSL_INCLUDES OSL/oslclosure.h PATHS 
${CYCLES_OSL}/include)
                find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to