mirror of https://github.com/microsoft/vcpkg.git
219 lines
5.9 KiB
Diff
219 lines
5.9 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index b35975a..3d0843c 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -181,7 +181,7 @@ if(EMSCRIPTEN)
|
|
endif()
|
|
|
|
|
|
-target_compile_definitions(mujoco PRIVATE _GNU_SOURCE CCD_STATIC_DEFINE MUJOCO_DLL_EXPORTS -DMC_IMPLEM_ENABLE)
|
|
+target_compile_definitions(mujoco PRIVATE _GNU_SOURCE MUJOCO_DLL_EXPORTS -DMC_IMPLEM_ENABLE)
|
|
if(MUJOCO_ENABLE_AVX_INTRINSICS)
|
|
target_compile_definitions(mujoco PUBLIC mjUSEPLATFORMSIMD)
|
|
endif()
|
|
@@ -204,9 +204,9 @@ target_link_libraries(
|
|
mujoco
|
|
PRIVATE ccd
|
|
lodepng
|
|
- qhullstatic_r
|
|
- tinyobjloader
|
|
- tinyxml2
|
|
+ Qhull::qhull_r
|
|
+ tinyobjloader::tinyobjloader
|
|
+ tinyxml2::tinyxml2
|
|
)
|
|
|
|
if(NOT EMSCRIPTEN)
|
|
diff --git a/cmake/MujocoDependencies.cmake b/cmake/MujocoDependencies.cmake
|
|
index b48537f..88db605 100644
|
|
--- a/cmake/MujocoDependencies.cmake
|
|
+++ b/cmake/MujocoDependencies.cmake
|
|
@@ -88,7 +88,7 @@ set(BUILD_SHARED_LIBS
|
|
CACHE INTERNAL "Build SHARED libraries"
|
|
)
|
|
|
|
-if(NOT TARGET lodepng)
|
|
+if(0)
|
|
FetchContent_Declare(
|
|
lodepng
|
|
GIT_REPOSITORY https://github.com/lvandeve/lodepng.git
|
|
@@ -112,7 +112,7 @@ if(NOT TARGET lodepng)
|
|
endif()
|
|
endif()
|
|
|
|
-if(NOT TARGET marchingcubecpp)
|
|
+if(0)
|
|
FetchContent_Declare(
|
|
marchingcubecpp
|
|
GIT_REPOSITORY https://github.com/aparis69/MarchingCubeCpp.git
|
|
@@ -126,6 +126,22 @@ if(NOT TARGET marchingcubecpp)
|
|
endif()
|
|
endif()
|
|
|
|
+findorfetch(
|
|
+ USE_SYSTEM_PACKAGE
|
|
+ ON
|
|
+ PACKAGE_NAME
|
|
+ lodepng
|
|
+ LIBRARY_NAME
|
|
+ lodepng
|
|
+ GIT_REPO
|
|
+ https://github.com/lvandeve/lodepng.git
|
|
+ GIT_TAG
|
|
+ ${MUJOCO_DEP_VERSION_lodepng}
|
|
+ TARGETS
|
|
+ lodepng
|
|
+ EXCLUDE_FROM_ALL
|
|
+)
|
|
+
|
|
set(QHULL_ENABLE_TESTING OFF)
|
|
# Patch changes in https://github.com/qhull/qhull/pull/173.patch
|
|
set(QHULL_PATCH_COMMAND
|
|
@@ -134,32 +150,39 @@ set(QHULL_PATCH_COMMAND
|
|
|
|
findorfetch(
|
|
USE_SYSTEM_PACKAGE
|
|
- OFF
|
|
+ ON
|
|
PACKAGE_NAME
|
|
- qhull
|
|
+ Qhull
|
|
LIBRARY_NAME
|
|
- qhull
|
|
+ Qhull
|
|
GIT_REPO
|
|
https://github.com/qhull/qhull.git
|
|
GIT_TAG
|
|
${MUJOCO_DEP_VERSION_qhull}
|
|
TARGETS
|
|
- qhull
|
|
+ Qhull
|
|
EXCLUDE_FROM_ALL
|
|
PATCH_COMMAND ${QHULL_PATCH_COMMAND}
|
|
)
|
|
# MuJoCo includes a file from libqhull_r which is not exported by the qhull include directories.
|
|
# Add it to the target.
|
|
+if(0)
|
|
target_include_directories(
|
|
qhullstatic_r INTERFACE $<BUILD_INTERFACE:${qhull_SOURCE_DIR}/src/libqhull_r>
|
|
)
|
|
target_compile_options(qhullstatic_r PRIVATE ${MUJOCO_MACOS_COMPILE_OPTIONS})
|
|
target_link_options(qhullstatic_r PRIVATE ${MUJOCO_MACOS_LINK_OPTIONS})
|
|
+endif()
|
|
|
|
+include_directories(
|
|
+ ${Qhull_DIR}/../../include
|
|
+ ${Qhull_DIR}/../../include/libqhull_r
|
|
+ ${Qhull_DIR}/../../include/marchingcubecpp
|
|
+)
|
|
set(tinyxml2_BUILD_TESTING OFF)
|
|
findorfetch(
|
|
USE_SYSTEM_PACKAGE
|
|
- OFF
|
|
+ ON
|
|
PACKAGE_NAME
|
|
tinyxml2
|
|
LIBRARY_NAME
|
|
@@ -172,8 +195,10 @@ findorfetch(
|
|
tinyxml2
|
|
EXCLUDE_FROM_ALL
|
|
)
|
|
+if(0)
|
|
target_compile_options(tinyxml2 PRIVATE ${MUJOCO_MACOS_COMPILE_OPTIONS})
|
|
target_link_options(tinyxml2 PRIVATE ${MUJOCO_MACOS_LINK_OPTIONS})
|
|
+endif()
|
|
|
|
# update cmake_minimum_required version for compatibility with newer version of cmake
|
|
if(NOT DEFINED CMAKE_POLICY_VERSION_MINIMUM)
|
|
@@ -182,7 +207,7 @@ if(NOT DEFINED CMAKE_POLICY_VERSION_MINIMUM)
|
|
endif()
|
|
findorfetch(
|
|
USE_SYSTEM_PACKAGE
|
|
- OFF
|
|
+ ON
|
|
PACKAGE_NAME
|
|
tinyobjloader
|
|
LIBRARY_NAME
|
|
@@ -215,7 +240,7 @@ if(NOT DEFINED CMAKE_POLICY_VERSION_MINIMUM)
|
|
endif()
|
|
findorfetch(
|
|
USE_SYSTEM_PACKAGE
|
|
- OFF
|
|
+ ON
|
|
PACKAGE_NAME
|
|
ccd
|
|
LIBRARY_NAME
|
|
@@ -233,12 +258,13 @@ if(CMAKE_POLICY_VERSION_MINIMUM_LOCALLY_DEFINED)
|
|
unset(CMAKE_POLICY_VERSION_MINIMUM)
|
|
unset(CMAKE_POLICY_VERSION_MINIMUM_LOCALLY_DEFINED)
|
|
endif()
|
|
+if(0)
|
|
target_compile_options(ccd PRIVATE ${MUJOCO_MACOS_COMPILE_OPTIONS})
|
|
target_link_options(ccd PRIVATE ${MUJOCO_MACOS_LINK_OPTIONS})
|
|
-
|
|
+endif()
|
|
# libCCD has an unconditional `#define _CRT_SECURE_NO_WARNINGS` on Windows.
|
|
# TODO(stunya): Remove this after https://github.com/danfis/libccd/pull/77 is merged.
|
|
-if(WIN32)
|
|
+if(0)
|
|
if(MSVC)
|
|
# C4005 is the MSVC equivalent of -Wmacro-redefined.
|
|
target_compile_options(ccd PRIVATE /wd4005)
|
|
@@ -254,12 +280,7 @@ else()
|
|
set(_BUILD_TESTS_WAS_DEFINED FALSE)
|
|
endif()
|
|
set(BUILD_TESTS OFF)
|
|
-fetchpackage(
|
|
- PACKAGE_NAME miniz
|
|
- GIT_REPO https://github.com/richgel999/miniz.git
|
|
- GIT_TAG ${MUJOCO_DEP_VERSION_miniz}
|
|
- TARGETS miniz
|
|
-)
|
|
+find_package(miniz CONFIG REQUIRED)
|
|
if(_BUILD_TESTS_WAS_DEFINED)
|
|
set(BUILD_TESTS "${_OLD_BUILD_TESTS}")
|
|
else()
|
|
@@ -284,7 +305,7 @@ if(MUJOCO_BUILD_TESTS OR MUJOCO_BUILD_STUDIO OR MUJOCO_USE_FILAMENT)
|
|
set(ABSL_BUILD_TESTING OFF)
|
|
findorfetch(
|
|
USE_SYSTEM_PACKAGE
|
|
- OFF
|
|
+ ON
|
|
PACKAGE_NAME
|
|
absl
|
|
LIBRARY_NAME
|
|
diff --git a/plugin/obj_decoder/CMakeLists.txt b/plugin/obj_decoder/CMakeLists.txt
|
|
index 689dfc5..4488a7e 100644
|
|
--- a/plugin/obj_decoder/CMakeLists.txt
|
|
+++ b/plugin/obj_decoder/CMakeLists.txt
|
|
@@ -17,4 +17,5 @@ target_sources(mujoco PRIVATE
|
|
obj_decoder.cc
|
|
)
|
|
|
|
-target_link_libraries(mujoco PRIVATE tinyobjloader)
|
|
+target_link_libraries(mujoco PRIVATE tinyobjloader::tinyobjloader)
|
|
+
|
|
diff --git a/simulate/cmake/SimulateDependencies.cmake b/simulate/cmake/SimulateDependencies.cmake
|
|
index 7885f5f..1da1be2 100644
|
|
--- a/simulate/cmake/SimulateDependencies.cmake
|
|
+++ b/simulate/cmake/SimulateDependencies.cmake
|
|
@@ -98,7 +98,7 @@ if(MUJOCO_EXTRAS_STATIC_GLFW)
|
|
unset(BUILD_SHARED_LIBS_OLD)
|
|
endif()
|
|
|
|
-if(NOT SIMULATE_STANDALONE AND NOT MUJOCO_SIMULATE_USE_SYSTEM_GLFW)
|
|
+if(0)
|
|
target_compile_options(glfw PRIVATE ${MUJOCO_MACOS_COMPILE_OPTIONS})
|
|
target_link_options(glfw PRIVATE ${MUJOCO_MACOS_LINK_OPTIONS})
|
|
endif()
|
|
diff --git a/src/xml/mjz/CMakeLists.txt b/src/xml/mjz/CMakeLists.txt
|
|
index ab92623..4ec37e9 100644
|
|
--- a/src/xml/mjz/CMakeLists.txt
|
|
+++ b/src/xml/mjz/CMakeLists.txt
|
|
@@ -18,4 +18,4 @@ set(MUJOCO_MJZ_SRCS
|
|
)
|
|
|
|
target_sources(mujoco PRIVATE ${MUJOCO_MJZ_SRCS})
|
|
-target_link_libraries(mujoco PRIVATE miniz)
|
|
+target_link_libraries(mujoco PRIVATE miniz::miniz)
|