-
Nicolas Pope authoredNicolas Pope authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
CMakeLists.txt 2.18 KiB
# Need to include staged files and libs
#include_directories(${PROJECT_SOURCE_DIR}/reconstruct/include)
#include_directories(${PROJECT_BINARY_DIR})
function(add_gui_module NAME)
get_filename_component(FULLPATH "src/modules/${NAME}.cpp" ABSOLUTE)
if (EXISTS ${FULLPATH})
list(APPEND GUI2SRC "src/modules/${NAME}.cpp")
endif()
get_filename_component(FULLPATH "src/views/${NAME}.cpp" ABSOLUTE)
if (EXISTS ${FULLPATH})
list(APPEND GUI2SRC "src/views/${NAME}.cpp")
endif()
set(GUI2SRC ${GUI2SRC} PARENT_SCOPE)
endfunction()
set(GUI2SRC
src/main.cpp
src/inputoutput.cpp
src/screen.cpp
src/view.cpp
src/widgets/soundctrl.cpp
src/widgets/popupbutton.cpp
src/widgets/imageview.cpp
src/widgets/combobox.cpp
src/widgets/leftbutton.cpp
)
add_gui_module("themes")
add_gui_module("statistics")
add_gui_module("config")
add_gui_module("camera")
add_gui_module("camera3d")
add_gui_module("thumbnails")
add_gui_module("addsource")
if (WITH_CERES)
list(APPEND GUI2SRC
src/modules/calibration/calibration.cpp
src/modules/calibration/extrinsic.cpp
src/modules/calibration/intrinsic.cpp
src/modules/calibration/stereo.cpp
src/views/calibration/widgets.cpp
src/views/calibration/extrinsicview.cpp
src/views/calibration/intrinsicview.cpp
src/views/calibration/stereoview.cpp
)
endif()
if (HAVE_OPENVR)
add_gui_module("cameravr")
endif()
# Various preprocessor definitions have been generated by NanoGUI
add_definitions(${NANOGUI_EXTRA_DEFS})
# On top of adding the path to nanogui/include, you may need extras
include_directories(${NANOGUI_EXTRA_INCS})
add_executable(ftl-gui2 ${GUI2SRC})
target_include_directories(ftl-gui2 PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/ext/nanogui/include>
$<INSTALL_INTERFACE:include>
PRIVATE src)
#if (CUDA_FOUND)
#set_property(TARGET ftl-gui2 PROPERTY CUDA_SEPARABLE_COMPILATION ON)
#endif()
#target_include_directories(cv-node PUBLIC ${PROJECT_SOURCE_DIR}/include)
target_link_libraries(ftl-gui2 ftlcommon ftldata ftlctrl ftlrgbd ftlstreams ftlrender Threads::Threads ${OpenCV_LIBS} openvr ftlnet nanogui ${NANOGUI_EXTRA_LIBS} ceres nvidia-ml)
target_precompile_headers(ftl-gui2 REUSE_FROM ftldata)