OpenCOLLADA rebuild
This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
From c3ed65c2c60b8744163b3a57cf24469e688536dd Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Scruggs <j.scruggs@gmail.com>
|
||||
Date: Sat, 13 Jan 2018 11:54:44 +0000
|
||||
Subject: [PATCH] OpenCOLLADA/CMakeLists.txt
|
||||
|
||||
Use CMAKE_BUILD_TYPE which can be overrided with custom distro types
|
||||
|
||||
Adhere to GNU filesystem layout conventions. Not all distros and OSes
|
||||
have directories in the same locations and they define the
|
||||
GNUInstallDirs variables, so use those variables. Also, this enables
|
||||
multi lib installations.
|
||||
|
||||
Define the version variables to enable SONAME versioning on the
|
||||
library files in case there is ABI changes in the future.
|
||||
---
|
||||
CMakeLists.txt | 58 ++++++++++++++++++++++++++++++++++++----------------------
|
||||
1 file changed, 36 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 95abbe21..00ad8d6a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -37,14 +37,41 @@ cmake_policy(SET CMP0010 NEW)
|
||||
# Input directories must have CMakeLists.txt
|
||||
cmake_policy(SET CMP0014 NEW)
|
||||
|
||||
-# avoid having empty buildtype
|
||||
-set(CMAKE_BUILD_TYPE_INIT "Release")
|
||||
|
||||
-set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Only do Release and Debug" FORCE )
|
||||
-mark_as_advanced(CMAKE_CONFIGURATION_TYPES)
|
||||
+# Set Release type for builds where CMAKE_BUILD_TYPE is unset
|
||||
+# This is usually a good default as this implictly enables
|
||||
+#
|
||||
+# CXXFLAGS = -O3 -DNDEBUG
|
||||
+#
|
||||
+if( NOT CMAKE_BUILD_TYPE )
|
||||
+ set( CMAKE_BUILD_TYPE "Release" )
|
||||
+endif()
|
||||
|
||||
SET(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Add this string to as suffix to Debug libraries, e.g.: xml2_d.lib " )
|
||||
|
||||
+# Adhere to GNU filesystem layout conventions
|
||||
+include( GNUInstallDirs )
|
||||
+
|
||||
+
|
||||
+# #-----------------------------------------------------------------------------
|
||||
+# Initialize project.
|
||||
+
|
||||
+project(OPENCOLLADA) # must be after setting cmake_configuration_types
|
||||
+
|
||||
+set(EXTERNAL_LIBRARIES ${OPENCOLLADA_SOURCE_DIR}/Externals) # external libraries
|
||||
+set(CMAKE_MODULE_PATH "${EXTERNAL_LIBRARIES}/cmake-modules")
|
||||
+
|
||||
+set(OPENCOLLADA_VERSION_MAJOR 1)
|
||||
+set(OPENCOLLADA_VERSION_MINOR 6)
|
||||
+set(OPENCOLLADA_VERSION_PATCH 68)
|
||||
+set(OPENCOLLADA_VERSION ${OPENCOLLADA_VERSION_MAJOR}.${OPENCOLLADA_VERSION_MINOR}.${OPENCOLLADA_VERSION_PATCH})
|
||||
+
|
||||
+if(NOT SOVERSION)
|
||||
+ set(SOVERSION ${OPENCOLLADA_VERSION_MAJOR}.${OPENCOLLADA_VERSION_MINOR}
|
||||
+ CACHE STRING "Set the SO version in the SO name of the output library")
|
||||
+endif()
|
||||
+
|
||||
+
|
||||
#-----------------------------------------------------------------------------
|
||||
# Macro's
|
||||
|
||||
@@ -58,7 +85,7 @@ macro(opencollada_add_lib
|
||||
|
||||
if (USE_STATIC)
|
||||
add_library(${name}_static STATIC ${sources})
|
||||
- set_target_properties(${name}_static PROPERTIES OUTPUT_NAME ${name})
|
||||
+ set_target_properties(${name}_static PROPERTIES OUTPUT_NAME ${name} SOVERSION ${SOVERSION})
|
||||
foreach(target_lib ${target_libs})
|
||||
if(TARGET ${target_lib}_static)
|
||||
target_link_libraries(${name}_static ${target_lib}_static)
|
||||
@@ -84,7 +111,7 @@ macro(opencollada_add_lib
|
||||
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})
|
||||
foreach(target_lib ${target_libs})
|
||||
if(TARGET ${target_lib}_shared)
|
||||
target_link_libraries(${name}_shared ${target_lib}_shared)
|
||||
@@ -145,19 +172,6 @@ endmacro()
|
||||
# end copy
|
||||
# --------
|
||||
|
||||
-#-----------------------------------------------------------------------------
|
||||
-# Initialize project.
|
||||
-
|
||||
-project(OPENCOLLADA) # must be after setting cmake_configuration_types
|
||||
-
|
||||
-set(EXTERNAL_LIBRARIES ${OPENCOLLADA_SOURCE_DIR}/Externals) # external libraries
|
||||
-set(CMAKE_MODULE_PATH "${EXTERNAL_LIBRARIES}/cmake-modules")
|
||||
-
|
||||
-set(OPENCOLLADA_VERSION_MAJOR 0)
|
||||
-set(OPENCOLLADA_VERSION_MINOR 1)
|
||||
-set(OPENCOLLADA_VERSION_PATCH 0)
|
||||
-set(OPENCOLLADA_VERSION ${OPENCOLLADA_VERSION_MAJOR}.${OPENCOLLADA_VERSION_MINOR}.${OPENCOLLADA_VERSION_PATCH})
|
||||
-
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Compiler warnings.
|
||||
@@ -190,9 +204,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNINGS}")
|
||||
#-----------------------------------------------------------------------------
|
||||
# Install vars
|
||||
|
||||
-set(OPENCOLLADA_INST_INCLUDE ${CMAKE_INSTALL_PREFIX}/include/opencollada)
|
||||
-set(OPENCOLLADA_INST_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/opencollada)
|
||||
-set(OPENCOLLADA_INST_CMAKECONFIG ${OPENCOLLADA_INST_LIBRARY}/cmake)
|
||||
+set(OPENCOLLADA_INST_INCLUDE ${CMAKE_INSTALL_FULL_INCLUDEDIR}/opencollada)
|
||||
+set(OPENCOLLADA_INST_LIBRARY ${CMAKE_INSTALL_FULL_LIBDIR}/opencollada)
|
||||
+set(OPENCOLLADA_INST_CMAKECONFIG ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/OpenCOLLADA)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
--
|
||||
2.15.1
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
https://bugs.gentoo.org/899750
|
||||
https://github.com/KhronosGroup/OpenCOLLADA/pull/656
|
||||
|
||||
From 84c8c9a02b4e5fe40465034563cb36527e865dac Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <slyich@gmail.com>
|
||||
Date: Mon, 11 Jul 2022 21:33:11 +0100
|
||||
Subject: [PATCH] DAEValidator: fix gcc-13 build
|
||||
|
||||
On gcc-13 c++ headers don't include <stdint.h> implicitly any more.
|
||||
This exposed build failure as:
|
||||
|
||||
/build/source/DAEValidator/library/src/XmlDoc.cpp: In member function 'virtual void opencollada::XmlDoc::readFile(const std::string&)':
|
||||
/build/source/DAEValidator/library/src/XmlDoc.cpp:59:17: error: 'uint32_t' was not declared in this scope
|
||||
59 | uint32_t signature = *reinterpret_cast<const uint32_t*>(content.data());
|
||||
| ^~~~~~~~
|
||||
--- a/DAEValidator/library/src/DaeValidator.cpp
|
||||
+++ b/DAEValidator/library/src/DaeValidator.cpp
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "Strings.h"
|
||||
#include "StringUtil.h"
|
||||
#include <cmath>
|
||||
+#include <cstdint>
|
||||
#include "no_warning_iomanip"
|
||||
#include "no_warning_iostream"
|
||||
#include <set>
|
||||
--- a/DAEValidator/library/src/XmlDoc.cpp
|
||||
+++ b/DAEValidator/library/src/XmlDoc.cpp
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Macros.h"
|
||||
|
||||
+#include <cstdint>
|
||||
#if IS_GNUC_AND_GNUC_VERSION_LT(5,1,1)
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/DAEValidator/CMakeLists.txt
|
||||
+++ b/DAEValidator/CMakeLists.txt
|
||||
@@ -100,7 +100,7 @@ if (WIN32)
|
||||
# C4820: 'bytes' bytes padding added after construct 'member_name'
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /Wall /WX /wd4505 /wd4514 /wd4592 /wd4710 /wd4711 /wd4820")
|
||||
else ()
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror")
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
|
||||
endif ()
|
||||
|
||||
add_custom_command(
|
||||
Reference in New Issue
Block a user