From d2b65074ac9b2b296ec72c6bf4dd546ce4666bb7 Mon Sep 17 00:00:00 2001 From: Hiroo Ono Date: Thu, 5 Sep 2024 02:51:18 +0900 Subject: Revert "Comment out 'install' lines in collada-dom' CMakeLists.txt, because" This reverts commit faf303b4100ac2f3143e7c1f72130c3ff569a8c7. --- patches/collada-dom-v2.3-r7.patch | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/patches/collada-dom-v2.3-r7.patch b/patches/collada-dom-v2.3-r7.patch index f80a42580e..e964a0c5a1 100644 --- a/patches/collada-dom-v2.3-r7.patch +++ b/patches/collada-dom-v2.3-r7.patch @@ -1,13 +1,14 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index b1c1993..cdcba63 100644 +index b1c1993..d9787be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1,14 +1,25 @@ +@@ -1,14 +1,37 @@ -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) -set(COLLADA14_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/1.4) -set(COLLADA15_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/1.5) +project(colladadom) +cmake_minimum_required(VERSION 3.17) ++cmake_policy(SET CMP0167 NEW) + +include(FindPkgConfig) + @@ -18,6 +19,17 @@ index b1c1993..cdcba63 100644 + +set(COLLADA_DOM_SOVERSION "0") +set(COLLADA_DOM_VERSION "2.3") ++set(COLLADA_DOM_INCLUDE_INSTALL_DIR ++ ${CMAKE_BINARY_DIR}/packages/include/collada ++) ++set(COLLADA_DOM_LIBS_INSTALL_DIR ++ ${CMAKE_BINARY_DIR}/packages/lib ++) ++file(MAKE_DIRECTORY ++ ${COLLADA_DOM_INCLUDE_INSTALL_DIR}/1.4 ++ ${COLLADA_DOM_INCLUDE_INSTALL_DIR}/1.5 ++ ${COLLADA_DOM_LIBS_INSTALL_DIR} ++) + file(GLOB dae_files ${CMAKE_CURRENT_SOURCE_DIR}/src/dae/*.cpp) file(GLOB libxmlplugin_files ${CMAKE_CURRENT_SOURCE_DIR}/src/modules/LIBXMLPlugin/*.cpp) @@ -33,22 +45,8 @@ index b1c1993..cdcba63 100644 if( OPT_COLLADA15 ) add_subdirectory(src/1.5) -@@ -17,8 +28,8 @@ if( OPT_COLLADA14 ) - add_subdirectory(src/1.4) - endif() - --install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/1.4 DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) --install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/1.5 DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) --install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/dae DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) --install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/modules DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) --install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/dae.h ${CMAKE_CURRENT_SOURCE_DIR}/include/dae.h DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR}) -+# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/1.4 DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) -+# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/1.5 DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) -+# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/dae DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) -+# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/modules DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) -+# install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/dae.h ${CMAKE_CURRENT_SOURCE_DIR}/include/dae.h DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR}) diff --git a/src/1.4/CMakeLists.txt b/src/1.4/CMakeLists.txt -index 17fbaea..93b8256 100644 +index 17fbaea..8df5462 100644 --- a/src/1.4/CMakeLists.txt +++ b/src/1.4/CMakeLists.txt @@ -1,10 +1,26 @@ @@ -80,7 +78,7 @@ index 17fbaea..93b8256 100644 SOVERSION ${COLLADA_DOM_SOVERSION} VERSION ${COLLADA_DOM_VERSION}) -install(TARGETS collada14dom DESTINATION lib${LIB_SUFFIX}) -+# install(TARGETS collada14dom DESTINATION ${COLLADA_DOM_LIBS_INSTALL_DIR}) ++install(TARGETS collada14dom DESTINATION ${COLLADA_DOM_LIBS_INSTALL_DIR}) diff --git a/src/1.5/CMakeLists.txt b/src/1.5/CMakeLists.txt index e061a01..fb73a70 100644 --- a/src/1.5/CMakeLists.txt -- cgit v1.2.3 From 17aaab3d851e533930bc7eb553caa35700b48452 Mon Sep 17 00:00:00 2001 From: Hiroo Ono Date: Sun, 8 Sep 2024 02:25:00 +0900 Subject: In the build of Collada-DOM, Check CMAKE_CXX_COMPILER_ID to set different options according to compiler. --- patches/collada-dom-v2.3-r7.patch | 46 +++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/patches/collada-dom-v2.3-r7.patch b/patches/collada-dom-v2.3-r7.patch index e964a0c5a1..c500de957d 100644 --- a/patches/collada-dom-v2.3-r7.patch +++ b/patches/collada-dom-v2.3-r7.patch @@ -1,14 +1,13 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index b1c1993..d9787be 100644 +index b1c1993..cdcba63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1,14 +1,37 @@ +@@ -1,14 +1,25 @@ -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) -set(COLLADA14_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/1.4) -set(COLLADA15_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/1.5) +project(colladadom) +cmake_minimum_required(VERSION 3.17) -+cmake_policy(SET CMP0167 NEW) + +include(FindPkgConfig) + @@ -19,17 +18,6 @@ index b1c1993..d9787be 100644 + +set(COLLADA_DOM_SOVERSION "0") +set(COLLADA_DOM_VERSION "2.3") -+set(COLLADA_DOM_INCLUDE_INSTALL_DIR -+ ${CMAKE_BINARY_DIR}/packages/include/collada -+) -+set(COLLADA_DOM_LIBS_INSTALL_DIR -+ ${CMAKE_BINARY_DIR}/packages/lib -+) -+file(MAKE_DIRECTORY -+ ${COLLADA_DOM_INCLUDE_INSTALL_DIR}/1.4 -+ ${COLLADA_DOM_INCLUDE_INSTALL_DIR}/1.5 -+ ${COLLADA_DOM_LIBS_INSTALL_DIR} -+) + file(GLOB dae_files ${CMAKE_CURRENT_SOURCE_DIR}/src/dae/*.cpp) file(GLOB libxmlplugin_files ${CMAKE_CURRENT_SOURCE_DIR}/src/modules/LIBXMLPlugin/*.cpp) @@ -45,18 +33,38 @@ index b1c1993..d9787be 100644 if( OPT_COLLADA15 ) add_subdirectory(src/1.5) +@@ -17,8 +28,8 @@ if( OPT_COLLADA14 ) + add_subdirectory(src/1.4) + endif() + +-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/1.4 DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) +-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/1.5 DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) +-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/dae DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) +-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/modules DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) +-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/dae.h ${CMAKE_CURRENT_SOURCE_DIR}/include/dae.h DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR}) ++# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/1.4 DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) ++# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/1.5 DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) ++# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/dae DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) ++# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/modules DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) ++# install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/dae.h ${CMAKE_CURRENT_SOURCE_DIR}/include/dae.h DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR}) diff --git a/src/1.4/CMakeLists.txt b/src/1.4/CMakeLists.txt -index 17fbaea..8df5462 100644 +index 17fbaea..07d341f 100644 --- a/src/1.4/CMakeLists.txt +++ b/src/1.4/CMakeLists.txt -@@ -1,10 +1,26 @@ +@@ -1,10 +1,32 @@ file(GLOB dom_files ${CMAKE_CURRENT_SOURCE_DIR}/dom/*.cpp) -include_directories(${COLLADA14_INCLUDE_DIR}) -add_library(collada14dom SHARED ${COLLADA_BASE_SOURCES} ${dom_files}) +add_library(collada14dom STATIC ${COLLADA_BASE_SOURCES} ${dom_files}) -+target_compile_options(collada14dom PRIVATE ++if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") ++ target_compile_options(collada14dom PRIVATE + "-Wno-error=unused-result" "-Wno-cast-user-defined" "-Wno-nonnull" -+) ++ ) ++elseif(CMAKE_CXX_COMPILER_ID STREQUAL "clang") ++ target_compile_options(collada14dom PRIVATE ++ "-Wno-error=unused-result" ++ ) ++endif() +target_include_directories(collada14dom PRIVATE + ${colladadom_SOURCE_DIR}/include + ${colladadom_SOURCE_DIR}/include/1.4 @@ -78,7 +86,7 @@ index 17fbaea..8df5462 100644 SOVERSION ${COLLADA_DOM_SOVERSION} VERSION ${COLLADA_DOM_VERSION}) -install(TARGETS collada14dom DESTINATION lib${LIB_SUFFIX}) -+install(TARGETS collada14dom DESTINATION ${COLLADA_DOM_LIBS_INSTALL_DIR}) ++# install(TARGETS collada14dom DESTINATION ${COLLADA_DOM_LIBS_INSTALL_DIR}) diff --git a/src/1.5/CMakeLists.txt b/src/1.5/CMakeLists.txt index e061a01..fb73a70 100644 --- a/src/1.5/CMakeLists.txt -- cgit v1.2.3 From 478520e7d8ae5c45d35e12e679f65ff6c92dad64 Mon Sep 17 00:00:00 2001 From: Hiroo Ono Date: Sun, 8 Sep 2024 02:35:02 +0900 Subject: 'Clang' is capitalized. Correct it. cf. https://cmake.org/cmake/help/v3.28/variable/CMAKE_LANG_COMPILER_ID.html --- patches/collada-dom-v2.3-r7.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/collada-dom-v2.3-r7.patch b/patches/collada-dom-v2.3-r7.patch index c500de957d..c2da9d04ed 100644 --- a/patches/collada-dom-v2.3-r7.patch +++ b/patches/collada-dom-v2.3-r7.patch @@ -48,7 +48,7 @@ index b1c1993..cdcba63 100644 +# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/modules DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR} PATTERN ".svn" EXCLUDE PATTERN ".~" EXCLUDE) +# install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/dae.h ${CMAKE_CURRENT_SOURCE_DIR}/include/dae.h DESTINATION ${COLLADA_DOM_INCLUDE_INSTALL_DIR}) diff --git a/src/1.4/CMakeLists.txt b/src/1.4/CMakeLists.txt -index 17fbaea..07d341f 100644 +index 17fbaea..86d2d1d 100644 --- a/src/1.4/CMakeLists.txt +++ b/src/1.4/CMakeLists.txt @@ -1,10 +1,32 @@ @@ -60,7 +60,7 @@ index 17fbaea..07d341f 100644 + target_compile_options(collada14dom PRIVATE + "-Wno-error=unused-result" "-Wno-cast-user-defined" "-Wno-nonnull" + ) -+elseif(CMAKE_CXX_COMPILER_ID STREQUAL "clang") ++elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + target_compile_options(collada14dom PRIVATE + "-Wno-error=unused-result" + ) -- cgit v1.2.3