File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44macro (add_submodule submodule_name )
55 # Clone a submodule and add its subdirectory to the build (if the corresponding target hasn't already been added)
6- set (options) # None
6+ set (options
7+ NO_CMAKELISTS # Skip adding a subdirectory if the submodule doesn't have a CMakeLists.txt file
8+ )
79 set (one_value_args
810 TARGET_NAME # Specify if target name is different from the submodule name
911 PARENT_SUBMODULE_PATH # Specify if you want to leverage a submodule outside of this project's vendor directory
@@ -39,7 +41,7 @@ macro(add_submodule submodule_name)
3941 endif ()
4042
4143 # Add subdirectory
42- if (NOT TARGET ${target_name} AND (EXISTS "${submodule_path} " ))
44+ if (NOT TARGET ${target_name} AND (EXISTS "${submodule_path} " ) AND NOT add_ ${submodule_name} _args_NO_CMAKELISTS )
4345 add_subdirectory (${submodule_path} )
4446 endif ()
4547
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ endif()
1111
1212add_submodule (courier MARK_AS_ADVANCED courier_BUILD_TESTING courier_COVERAGE courier_STATIC_LIB )
1313add_submodule (glfw )
14+ add_submodule (libtess2 NO_CMAKELISTS TARGET_NAME tess2 )
1415
1516# GLAD
1617add_subdirectory (glad )
You can’t perform that action at this time.
0 commit comments