fix for error linking opencollada on linux.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 12 Sep 2011 13:58:13 +0000 (13:58 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 12 Sep 2011 13:58:13 +0000 (13:58 +0000)
CMakeLists.txt
build_files/cmake/macros.cmake

index ea89cbd..6eb8b8c 100644 (file)
@@ -702,7 +702,7 @@ elseif(WIN32)
                                ${LIBDIR}/opencollada/lib/ftoa.lib
                                ${LIBDIR}/opencollada/lib/UTF.lib
                        )
-                       set(PCRE_LIB
+                       set(PCRE_LIBRARIES
                                ${LIBDIR}/opencollada/lib/pcre.lib
                        )
                endif()
@@ -844,7 +844,7 @@ elseif(WIN32)
                        )
                        set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
                        set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
-                       set(PCRE_LIB pcre)
+                       set(PCRE_LIBRARIES pcre)
                endif()
                
                if(WITH_CODEC_FFMPEG)
@@ -1066,7 +1066,7 @@ elseif(APPLE)
                #pcre is bundled with openCollada
                #set(PCRE ${LIBDIR}/pcre)
                #set(PCRE_LIBPATH ${PCRE}/lib)
-               set(PCRE_LIB pcre)
+               set(PCRE_LIBRARIES pcre)
                #libxml2 is used
                #set(EXPAT ${LIBDIR}/expat)
                #set(EXPAT_LIBPATH ${EXPAT}/lib)
index d09215d..aec7a9f 100644 (file)
@@ -295,10 +295,10 @@ macro(setup_liblinks
                        target_link_libraries_optimized(${target} "${OPENCOLLADA_LIBRARIES}")
                        unset(OPENCOLLADA_LIBRARIES_DEBUG)
 
-                       file_list_suffix(PCRE_LIB_DEBUG "${PCRE_LIB}" "_d")
-                       target_link_libraries_debug(${target} "${PCRE_LIB_DEBUG}")
-                       target_link_libraries_optimized(${target} "${PCRE_LIB}")
-                       unset(PCRE_LIB_DEBUG)
+                       file_list_suffix(PCRE_LIBRARIES_DEBUG "${PCRE_LIBRARIES}" "_d")
+                       target_link_libraries_debug(${target} "${PCRE_LIBRARIES_DEBUG}")
+                       target_link_libraries_optimized(${target} "${PCRE_LIBRARIES}")
+                       unset(PCRE_LIBRARIES_DEBUG)
 
                        if(EXPAT_LIB)
                                file_list_suffix(EXPAT_LIB_DEBUG "${EXPAT_LIB}" "_d")
@@ -309,7 +309,8 @@ macro(setup_liblinks
                else()
                        target_link_libraries(${target}
                                        ${OPENCOLLADA_LIBRARIES}
-                                       ${PCRE_LIB}
+                                       ${PCRE_LIBRARIES}
+                                       ${XML2_LIBRARIES}
                                        ${EXPAT_LIB})
                endif()
        endif()