summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/cmake/DepsBuild.cmake17
-rw-r--r--indra/cmake/LLPrimitive.cmake2
-rw-r--r--indra/llprimitive/CMakeLists.txt16
3 files changed, 35 insertions, 0 deletions
diff --git a/indra/cmake/DepsBuild.cmake b/indra/cmake/DepsBuild.cmake
new file mode 100644
index 0000000000..f4d80e9a67
--- /dev/null
+++ b/indra/cmake/DepsBuild.cmake
@@ -0,0 +1,17 @@
+# -*- cmake -*-
+find_program(GIT git)
+
+macro( checkout_deps_repository DEPSREPO DEPSDIR DEPSTAG)
+ execute_process(
+ COMMAND ${GIT} "clone" ${DEPSREPO} ${DEPSDIR}
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../..
+ )
+ execute_process(
+ COMMAND ${GIT} "checkout" ${DEPSTAG}
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../${DEPSDIR}
+ )
+ execute_process(
+ COMMAND ${GIT} "pull"
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../${DEPSDIR}
+ )
+endmacro( checkout_deps_repository )
diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake
index 216f4d574a..6f14c04efc 100644
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -19,6 +19,7 @@ if( USE_CONAN )
endif()
if(LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD )
+if(FALSE)
include(FindPkgConfig)
pkg_check_modules(Colladadom REQUIRED collada-dom)
target_compile_definitions( ll::colladadom INTERFACE COLLADA_DOM_SUPPORT141 )
@@ -26,6 +27,7 @@ if(LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD )
target_link_directories( ll::colladadom INTERFACE ${Colladadom_LIBRARY_DIRS} )
target_link_libraries( ll::colladadom INTERFACE ${Colladadom_LIBRARIES} )
return ()
+endif(FALSE)
endif(LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD )
if( USESYSTEMLIBS )
diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt
index dea85f8f4f..985c15b99f 100644
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
@@ -3,6 +3,7 @@
project(llprimitive)
include(00-Common)
+include(DepsBuild)
include(LLCommon)
include(LLCoreHttp)
include(LLPhysicsExtensions)
@@ -11,6 +12,21 @@ include(GLH)
include(GLM)
include(TinyGLTF)
+if(LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD )
+ checkout_deps_repository(
+ "https://github.com/oikumene/3p-colladadom-test.git"
+ "collada-dom" "v2.3-r7-megapahit"
+ )
+ set(OPT_COLLADA14 TRUE)
+ add_subdirectory(${CMAKE_SOURCE_DIR}/../../collada-dom "collada-dom")
+ target_include_directories(
+ ll::colladadom INTERFACE
+ ${colladadom_SOURCE_DIR}/include
+ ${colladadom_SOURCE_DIR}/include/1.4
+ )
+ target_link_libraries( ll::colladadom INTERFACE collada14dom )
+endif(LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD )
+
set(llprimitive_SOURCE_FILES
lldaeloader.cpp
llgltfloader.cpp