Link GLFW as a shared library by default
Use one option name to control building GLFW as static/shared since it is not straightforward to set it seperately for the samples and simulate
This commit is contained in:
@@ -58,8 +58,8 @@ findorfetch(
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
option(MUJOCO_SAMPLES_STATIC_GLFW "Link MuJoCo sample apps against GLFW statically." ON)
|
||||
if(MUJOCO_SAMPLES_STATIC_GLFW)
|
||||
option(MUJOCO_EXTRAS_STATIC_GLFW "Link MuJoCo sample apps and simulate libraries against GLFW statically." OFF)
|
||||
if(MUJOCO_EXTRAS_STATIC_GLFW)
|
||||
set(BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS})
|
||||
set(BUILD_SHARED_LIBS
|
||||
OFF
|
||||
@@ -88,12 +88,12 @@ findorfetch(
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
if(MUJOCO_SAMPLES_STATIC_GLFW)
|
||||
if(MUJOCO_EXTRAS_STATIC_GLFW)
|
||||
set(BUILD_SHARED_LIBS
|
||||
${BUILD_SHARED_LIBS_OLD}
|
||||
CACHE BOOL "Build SHARED libraries" FORCE
|
||||
)
|
||||
unset(BUILD_SHARED_LIBS_OLD)
|
||||
unset(MUJOCO_EXTRAS_STATIC_GLFW)
|
||||
endif()
|
||||
|
||||
if(NOT SAMPLE_STANDALONE)
|
||||
|
||||
Reference in New Issue
Block a user