File openCOLLADA-cmakelinuxbuild.patch of Package openCOLLADA

Index: COLLADAValidator/CMakeLists.txt
===================================================================
--- COLLADAValidator/CMakeLists.txt	(revision 868)
+++ COLLADAValidator/CMakeLists.txt	(working copy)
@@ -23,7 +23,6 @@
 	MathMLSolver
 	${PCRE_LIBRARIES}
 	${LIBXML2_LIBRARIES}
-	UTF
 )
 
 include_directories(
Index: COLLADAStreamWriter/CMakeLists.txt
===================================================================
--- COLLADAStreamWriter/CMakeLists.txt	(revision 868)
+++ COLLADAStreamWriter/CMakeLists.txt	(working copy)
@@ -1,12 +1,36 @@
 set(name OpenCOLLADAStreamWriter)
 project(${name})
 
+SET(libBuffer_include_dirs
+       ${CMAKE_CURRENT_SOURCE_DIR}/../common/libBuffer/include/
+)
+
+SET(libftoa_include_dirs
+       ${CMAKE_CURRENT_SOURCE_DIR}/../common/libftoa/include/
+)
+
+SET(libUTF_include_dirs
+       ${CMAKE_CURRENT_SOURCE_DIR}/../Externals/UTF/include/
+)
+
 set(libStreamWriter_include_dirs
 	${CMAKE_CURRENT_SOURCE_DIR}/include
 )
 
 set(libStreamWriter_include_dirs ${libStreamWriter_include_dirs} PARENT_SCOPE)  # adding include dirs to a parent scope
 
+SET(libBuffer_src_dirs
+       ${CMAKE_CURRENT_SOURCE_DIR}/../common/libBuffer/src/
+)
+
+SET(libftoa_src_dirs
+       ${CMAKE_CURRENT_SOURCE_DIR}/../common/libftoa/src/
+)
+
+SET(libUTF_src_dirs
+       ${CMAKE_CURRENT_SOURCE_DIR}/../Externals/UTF/src/
+)
+
 set(INST_SRC
 	include/COLLADASWAnnotation.h
 	include/COLLADASWAsset.h
@@ -124,14 +148,21 @@
 	src/COLLADASWElementWriter.cpp
 	src/COLLADASWLibrary.cpp
 	src/COLLADASWConstants.cpp
+	# Include libftoa and libBuffer files here.
+	${libBuffer_src_dirs}/CommonBuffer.cpp
+	${libBuffer_src_dirs}/CommonCharacterBuffer.cpp
+	${libBuffer_src_dirs}/CommonFWriteBufferFlusher.cpp
+	${libBuffer_src_dirs}/CommonStreamBufferFlusher.cpp
+	${libftoa_src_dirs}/Commondtoa.cpp
+	${libftoa_src_dirs}/Commonftoa.cpp
+	${libftoa_src_dirs}/Commonitoa.cpp
+	${libUTF_src_dirs}/ConvertUTF.c
 
 	${INST_SRC}
 )
 
 set(TARGET_LIBS
 	OpenCOLLADABaseUtils	
-	buffer
-	ftoa
 )
 
 include_directories(
@@ -139,6 +170,7 @@
 	${libBaseUtils_include_dirs} 
 	${libftoa_include_dirs} 
 	${libBuffer_include_dirs}
+	${libUTF_include_dirs}
 )
 
 opencollada_add_lib(${name} "${SRC}" "${TARGET_LIBS}")
Index: COLLADABaseUtils/CMakeLists.txt
===================================================================
--- COLLADABaseUtils/CMakeLists.txt	(revision 868)
+++ COLLADABaseUtils/CMakeLists.txt	(working copy)
@@ -8,6 +8,14 @@
 
 set(libBaseUtils_include_dirs ${libBaseUtils_include_dirs} PARENT_SCOPE)  # adding include dirs to a parent scope
 
+SET(libUTF_include_dirs
+       ${CMAKE_CURRENT_SOURCE_DIR}/../Externals/UTF/include/
+)
+
+SET(libUTF_src_dirs
+       ${CMAKE_CURRENT_SOURCE_DIR}/../Externals/UTF/src/
+)
+
 set(INST_SRC
 	include/COLLADABUIDList.h
 	include/COLLADABUStableHeaders.h
@@ -47,13 +55,13 @@
 	src/Math/COLLADABUMathUtils.cpp
 	src/Math/COLLADABUMathQuaternion.cpp
 	src/Math/COLLADABUMathMatrix4.cpp
+	${libUTF_src_dirs}/ConvertUTF.c
 
     ${INST_SRC}
     ${INST_MATH_SRC}
 )
 
 set(TARGET_LIBS
-	UTF
 	${PCRE_LIBRARIES}
 )
 
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 868)
+++ CMakeLists.txt	(working copy)
@@ -71,7 +71,7 @@
 			message(${name} " WARNING: Shared library support implemented for UNIX-like OS only")
 		endif ()
 		add_library(${name}_shared SHARED ${sources})
-		set_target_properties(${name}_shared PROPERTIES OUTPUT_NAME ${name})
+		set_target_properties(${name}_shared PROPERTIES OUTPUT_NAME ${name} SOVERSION ${soversion})
 		target_link_libraries(${name}_shared ${target_libs})
 		set(CMAKE_REQUIRED_LIBRARIES "${name}_shared;${CMAKE_REQUIRED_LIBRARIES}"  PARENT_SCOPE)
 
@@ -164,8 +164,8 @@
 #-----------------------------------------------------------------------------
 # Install vars
 
-set(OPENCOLLADA_INST_INCLUDE ${CMAKE_INSTALL_PREFIX}/include/opencollada)
-set(OPENCOLLADA_INST_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/opencollada)
+set(OPENCOLLADA_INST_INCLUDE ${INCLUDE_INSTALL_DIR})
+set(OPENCOLLADA_INST_LIBRARY ${LIB_INSTALL_DIR})
 
 
 #-----------------------------------------------------------------------------
@@ -229,9 +229,6 @@
 endif ()
 
 # building required libs
-add_subdirectory(common/libftoa)
-add_subdirectory(common/libBuffer)
-add_subdirectory(${EXTERNAL_LIBRARIES}/UTF)
 add_subdirectory(${EXTERNAL_LIBRARIES}/MathMLSolver)
 
 # building OpenCOLLADA libs
openSUSE Build Service is sponsored by