summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-09-08 11:30:34 +0800
committerGitHub <noreply@github.com>2024-09-08 11:30:34 +0800
commit96a75ebaf65c3cc76c087b5cd87444072597d604 (patch)
tree29eaa946dae8628750620e1143f35625cc3e1e12
parenta1df355dde31a899163c87f53365592730e2335d (diff)
parent478520e7d8ae5c45d35e12e679f65ff6c92dad64 (diff)
Merge pull request #12 from oikumene/freebsd
check CMAKE_CXX_COMPILER_ID to adjust compiler options
-rw-r--r--patches/collada-dom-v2.3-r7.patch14
1 files changed, 10 insertions, 4 deletions
diff --git a/patches/collada-dom-v2.3-r7.patch b/patches/collada-dom-v2.3-r7.patch
index f80a42580e..c2da9d04ed 100644
--- a/patches/collada-dom-v2.3-r7.patch
+++ b/patches/collada-dom-v2.3-r7.patch
@@ -48,17 +48,23 @@ 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..93b8256 100644
+index 17fbaea..86d2d1d 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