Skip to content

Commit

Permalink
Add OSCDEPS_BUILD_ALWAYS to third_party/CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Jun 27, 2024
1 parent 59bf26a commit 9274109
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ set(OSCDEPS_GET_IMGUI ON CACHE BOOL "enable getting imgui")
set(OSCDEPS_GET_IMGUIZMO ON CACHE BOOL "enable getting ImGuizmo")
set(OSCDEPS_GET_IMPLOT ON CACHE BOOL "enable gettting implot")
set(OSCDEPS_GET_OPENSIM ON CACHE BOOL "enable getting OpenSim (+its dependencies)")
set(OSCDEPS_BUILD_ALWAYS OFF CACHE BOOL "set BUILD_ALWAYS on all dependency targets, useful when editing dependencies")

include(ExternalProject) # ExternalProject_Add
include(GNUInstallDirs) # CMAKE_INSTALL_LIBDIR
Expand Down Expand Up @@ -51,6 +52,7 @@ endif()
if(${OSCDEPS_GET_GOOGLETEST})
ExternalProject_Add(googletest
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/googletest
BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
-DBUILD_GMOCK:BOOL=OFF
Expand All @@ -62,6 +64,7 @@ if(${OSCDEPS_GET_BENCHMARK})
ExternalProject_Add(benchmark
DEPENDS googletest
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/benchmark
BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
-DGOOGLETEST_PATH:STRING=${CMAKE_CURRENT_SOURCE_DIR}/googletest
Expand All @@ -73,6 +76,7 @@ endif()
if(${OSCDEPS_GET_LUNASVG})
ExternalProject_Add(lunasvg
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lunasvg
BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
)
Expand All @@ -81,6 +85,7 @@ endif()
if(${OSCDEPS_GET_SDL})
ExternalProject_Add(sdl
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SDL
BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
-DSDL_INSTALL_CMAKEDIR:STRING=${CMAKE_INSTALL_LIBDIR}/cmake/SDL2
Expand All @@ -92,6 +97,7 @@ endif()
if(${OSCDEPS_GET_TOMLPLUSPLUS})
ExternalProject_Add(tomlplusplus
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tomlplusplus
BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
)
Expand All @@ -100,6 +106,7 @@ endif()
if(${OSCDEPS_GET_UNORDERED_DENSE})
ExternalProject_Add(unordered_dense
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/unordered_dense
BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
)
Expand All @@ -109,6 +116,7 @@ if(${OSCDEPS_GET_GLEW})
ExternalProject_Add(glew
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/glew
SOURCE_SUBDIR build/cmake
BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
-DBUILD_UTILS:BOOL=OFF
Expand All @@ -124,6 +132,7 @@ if (${OSCDEPS_GET_ICONFONTCPPHEADERS})
PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/IconFontCppHeaders.cmake" <SOURCE_DIR>/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/IconFontCppHeadersConfig.cmake.in" <SOURCE_DIR>/IconFontCppHeadersConfig.cmake.in

BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
)
Expand All @@ -137,6 +146,7 @@ if (${OSCDEPS_GET_STB})
PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/stb.cmake" <SOURCE_DIR>/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/stbConfig.cmake.in" <SOURCE_DIR>/stbConfig.cmake.in

BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
)
Expand All @@ -150,6 +160,7 @@ if(${OSCDEPS_GET_NATIVEFILEDIALOG})
PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/nativefiledialog.cmake" <SOURCE_DIR>/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/nativefiledialogConfig.cmake.in" <SOURCE_DIR>/nativefiledialogConfig.cmake.in

BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
)
Expand All @@ -163,6 +174,7 @@ if (${OSCDEPS_GET_IMGUI})
PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/imgui.cmake" <SOURCE_DIR>/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/imguiConfig.cmake.in" <SOURCE_DIR>/imguiConfig.cmake.in

BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
-DCMAKE_PREFIX_PATH:PATH=${CMAKE_INSTALL_PREFIX}
Expand All @@ -178,6 +190,7 @@ if(${OSCDEPS_GET_IMGUIZMO})
PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ImGuizmo.cmake" <SOURCE_DIR>/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ImGuizmoConfig.cmake.in" <SOURCE_DIR>/ImGuizmoConfig.cmake.in

BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
-DCMAKE_PREFIX_PATH:PATH=${CMAKE_INSTALL_PREFIX}
Expand All @@ -193,6 +206,7 @@ if(${OSCDEPS_GET_IMPLOT})
PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/implot.cmake" <SOURCE_DIR>/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cmake/implotConfig.cmake.in" <SOURCE_DIR>/implotConfig.cmake.in

BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
-DCMAKE_PREFIX_PATH:PATH=${CMAKE_INSTALL_PREFIX}
Expand All @@ -204,6 +218,7 @@ if(${OSCDEPS_GET_OPENSIM})
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/opensim-core/dependencies
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/opensim-core-dependencies-install
INSTALL_COMMAND "" # OpenSim's dependency build installs during its build step
BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
-DOPENSIM_WITH_CASADI:BOOL=OFF
Expand All @@ -216,6 +231,7 @@ if(${OSCDEPS_GET_OPENSIM})
DEPENDS opensim-core-dependencies
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/opensim-core
TEST_EXCLUDE_FROM_MAIN ON
BUILD_ALWAYS ${OSCDEPS_BUILD_ALWAYS}
CMAKE_CACHE_ARGS
${OSCDEPS_DEPENDENCY_CMAKE_ARGS}
-DOPENSIM_WITH_CASADI:BOOL=OFF
Expand Down

0 comments on commit 9274109

Please sign in to comment.