Files
OpenSpace/tests/CMakeLists.txt
Gene Payne cec6e05ff1 Allow Window Config GUI to Edit Files (#2574)
* Added pboettch/json-schema-validator submodule

* Added initial code for selecting window config to edit

* Use updated sgct submodule with json-validate

* Bump sgct submodule version reference

* Bump sgct submodule version reference

* Version checking of sgct window config in progress

* Json schema validator submodule is now in sgct

* Added support for read-only window configs, and additional changes

* More changes with opening config in window edit, plus schema files added

* Update sgct schema version with more defs to work with sgctedit schema

* Fixes to get sgct edit schema working with dialog for error messages

* Improvements in exception handling

* Improved handling of multiple sgct & json exception types

* Minor improvements in exception messages

* Extra spaces in error message output

* Fixing importing of json config data from launcher to sgctedit

* Fixed window size & position update

* Changes for preserving settings in edit vs new mode

* Changes to import settings from config file

* More changes for importing testing of config file based on file tests

* Fixed window placement dims in monitor, and some code refactoring

* Move json validation before initial read

* Add CMake copy of sgct schema file to OpenSpace post-build

* Bump sgct submodule reference

* Modify calls for json schema validation and bump to latest sgct

* Bump to new sgct repo with unit testing and updated schema

* Added first test for window config editor schema

* Finished tests for sgcteditor validation

* Code cleanup pass

* Fix of sgctedit test for remove description

* CMake and include config changes to fix build after merge

* Bump sgct submodule version

* Improve paths in sgctedit test

* Bump sgct reference for test path fix

* Check for imported monitor number being in valid range

* Make sgct config 'monitor' key/value optional

* Have 'save' or 'save as' buttons depending on edit or new modes

* Code review feedback changes

* Fix to include the last file in the user config dir list

* Addressing some PR request

* Change to pass-by-reference in editRefusalDialog

* Separating errors into summary and detailed messages in error dialog

* Disable edit button with hover text if config read shows invalid format

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
2023-04-14 18:28:31 -06:00

84 lines
3.8 KiB
CMake

##########################################################################################
# #
# OpenSpace #
# #
# Copyright (c) 2014-2023 #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy of this #
# software and associated documentation files (the "Software"), to deal in the Software #
# without restriction, including without limitation the rights to use, copy, modify, #
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to #
# permit persons to whom the Software is furnished to do so, subject to the following #
# conditions: #
# #
# The above copyright notice and this permission notice shall be included in all copies #
# or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, #
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A #
# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT #
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF #
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE #
# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #
##########################################################################################
add_executable(
OpenSpaceTest
main.cpp
test_assetloader.cpp
test_concurrentqueue.cpp
test_distanceconversion.cpp
test_configuration.cpp
test_documentation.cpp
test_horizons.cpp
test_iswamanager.cpp
test_jsonformatting.cpp
test_latlonpatch.cpp
test_lrucache.cpp
test_lua_createsinglecolorimage.cpp
test_profile.cpp
test_rawvolumeio.cpp
test_scriptscheduler.cpp
test_sgctedit.cpp
test_spicemanager.cpp
test_timeconversion.cpp
test_timeline.cpp
test_timequantizer.cpp
property/test_property_optionproperty.cpp
property/test_property_listproperties.cpp
property/test_property_selectionproperty.cpp
regression/517.cpp
)
set_openspace_compile_settings(OpenSpaceTest)
target_include_directories(OpenSpaceTest
PUBLIC
"../apps/OpenSpace/ext/sgct/ext/json/include"
"../apps/OpenSpace/ext/sgct/ext/json-schema-validator/src"
)
target_compile_definitions(OpenSpaceTest PUBLIC "GHL_THROW_ON_ASSERT")
target_link_libraries(OpenSpaceTest PUBLIC Catch2 openspace-core sgct)
foreach (library_name ${all_enabled_modules})
get_target_property(library_type ${library_name} TYPE)
if (NOT ${library_type} STREQUAL "SHARED_LIBRARY")
target_link_libraries(OpenSpaceTest PRIVATE ${library_name})
endif ()
endforeach ()
if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
# Add the CEF binary distribution's cmake/ directory to the module path and
# find CEF to initialize it properly.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake")
include(webbrowser_helpers)
set_cef_targets("${CEF_ROOT}" OpenSpaceTest)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
endif ()
set_target_properties(OpenSpaceTest PROPERTIES FOLDER "Unit Tests")