File tree Expand file tree Collapse file tree 1 file changed +17
-13
lines changed
Expand file tree Collapse file tree 1 file changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -9,23 +9,27 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
99file (GLOB_RECURSE SOURCES CONFIGURE_DEPENDS "src/*.cpp" )
1010file (GLOB_RECURSE HEADERS CONFIGURE_DEPENDS "src/*.hpp" )
1111
12- # Find OpenCV
13- find_package (OpenCV REQUIRED)
14-
15- # Get FTXUI
1612include (FetchContent)
17-
1813set (FETCHCONTENT_UPDATES_DISCONNECTED ON )
1914set (FETCHCONTENT_QUIET OFF )
2015
21- FetchContent_Declare(ftxui
22- GIT_REPOSITORY https://github.com/arthursonzogni/ftxui.git
23- GIT_TAG v5.0.0
24- GIT_PROGRESS TRUE
25- GIT_SHALLOW TRUE
26- EXCLUDE_FROM_ALL
27- )
28- FetchContent_MakeAvailable(ftxui)
16+ # Check if OpenCV is installed
17+ find_package (OpenCV REQUIRED)
18+
19+ # Check if FTXUI is already installed
20+ find_package (ftxui QUIET )
21+
22+ if (NOT ftxui_FOUND)
23+ # Get FTXUI
24+ FetchContent_Declare(ftxui
25+ GIT_REPOSITORY https://github.com/arthursonzogni/ftxui.git
26+ GIT_TAG v5.0.0
27+ GIT_PROGRESS TRUE
28+ GIT_SHALLOW TRUE
29+ EXCLUDE_FROM_ALL
30+ )
31+ FetchContent_MakeAvailable(ftxui)
32+ endif ()
2933
3034# Add binary
3135add_executable (${PROJECT_NAME} ${SOURCES} )
You can’t perform that action at this time.
0 commit comments