File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,19 @@ endif()
9
9
10
10
if (NOT mujoco_FOUND)
11
11
message (STATUS "Looking for MuJoCo tar install ..." )
12
+ # Initialize MUJOCO_DIR from environment variable if not yet set as cmake variable
13
+ if (NOT DEFINED MUJOCO_DIR)
14
+ set (MUJOCO_DIR $ENV{MUJOCO_DIR} CACHE PATH "Path to MuJoCo installation directory" )
15
+ endif ()
12
16
# Find headers
13
- find_file (mujoco_INCLUDE_DIRS include /mujoco/mujoco.h PATHS ENV MUJOCO_DIR)
17
+ find_file (mujoco_INCLUDE_DIRS include /mujoco/mujoco.h PATHS ${ MUJOCO_DIR} )
14
18
if (mujoco_INCLUDE_DIRS)
15
19
get_filename_component (mujoco_INCLUDE_DIRS ${mujoco_INCLUDE_DIRS} PATH )
16
20
get_filename_component (mujoco_INCLUDE_DIRS ${mujoco_INCLUDE_DIRS} PATH )
17
21
endif ()
18
22
19
23
# Find library
20
- find_library (mujoco_LIBRARIES lib/libmujoco.so PATHS ENV MUJOCO_DIR)
24
+ find_library (mujoco_LIBRARIES lib/libmujoco.so PATHS ${ MUJOCO_DIR} )
21
25
22
26
# Find dependencies
23
27
cmake_policy (SET CMP0072 NEW)
You can’t perform that action at this time.
0 commit comments