diff --git a/cockatrice/CMakeLists.txt b/cockatrice/CMakeLists.txt index 63ccc4e9c..48f0144a2 100644 --- a/cockatrice/CMakeLists.txt +++ b/cockatrice/CMakeLists.txt @@ -1,9 +1,12 @@ -# CMakeLists for cockatrice directory +# CMakeLists for "cockatrice" directory # -# provides the cockatrice binary +# Provides the Cockatrice binary project(Cockatrice VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") +# ------------------------ +# Paths and directories +# ------------------------ set(cockatrice_SOURCES ${VERSION_STRING_CPP} # sort by alphabetical order, so that there is no debate about where to add new sources to the list diff --git a/cockatrice/themes/CMakeLists.txt b/cockatrice/themes/CMakeLists.txt index 577977551..55ddccce1 100644 --- a/cockatrice/themes/CMakeLists.txt +++ b/cockatrice/themes/CMakeLists.txt @@ -1,14 +1,13 @@ -# CMakeLists for themes directory +# CMakeLists for ./cockatrice/themes directory # -# add themes subfolders +# Add themes subfolders set(defthemes Default Fabric Fusion Leather Plasma VelvetMarble) if(UNIX) - if(APPLE) + if(APPLE) # macOS install(DIRECTORY ${defthemes} DESTINATION Cockatrice.app/Contents/Resources/themes/) - else() - # Assume linux + else() # Assume Linux install(DIRECTORY ${defthemes} DESTINATION share/cockatrice/themes/) endif() elseif(WIN32) diff --git a/libcockatrice_card/CMakeLists.txt b/libcockatrice_card/CMakeLists.txt index 081e6fd05..03c902724 100644 --- a/libcockatrice_card/CMakeLists.txt +++ b/libcockatrice_card/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "libcockatrice_card" directory + set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/libcockatrice_deck_list/CMakeLists.txt b/libcockatrice_deck_list/CMakeLists.txt index c7a54a390..18c9a1eb4 100644 --- a/libcockatrice_deck_list/CMakeLists.txt +++ b/libcockatrice_deck_list/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "libcockatrice_deck_list" directory + set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/libcockatrice_filters/CMakeLists.txt b/libcockatrice_filters/CMakeLists.txt index 905533df8..7f12628e0 100644 --- a/libcockatrice_filters/CMakeLists.txt +++ b/libcockatrice_filters/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "libcockatrice_filters" directory + set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/libcockatrice_interfaces/CMakeLists.txt b/libcockatrice_interfaces/CMakeLists.txt index f53c41807..d9514c47d 100644 --- a/libcockatrice_interfaces/CMakeLists.txt +++ b/libcockatrice_interfaces/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "libcockatrice_interfaces" directory + set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/libcockatrice_models/CMakeLists.txt b/libcockatrice_models/CMakeLists.txt index 7af35b2d5..d913d1625 100644 --- a/libcockatrice_models/CMakeLists.txt +++ b/libcockatrice_models/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "libcockatrice_models" directory + set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/libcockatrice_network/CMakeLists.txt b/libcockatrice_network/CMakeLists.txt index 3069c0db4..4a5435703 100644 --- a/libcockatrice_network/CMakeLists.txt +++ b/libcockatrice_network/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "libcockatrice_network" directory + set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/libcockatrice_protocol/CMakeLists.txt b/libcockatrice_protocol/CMakeLists.txt index 7dc0a0360..f78dafdc9 100644 --- a/libcockatrice_protocol/CMakeLists.txt +++ b/libcockatrice_protocol/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "libcockatrice_protocol" directory +# # Top-level wrapper for the protobuf library add_subdirectory(libcockatrice/protocol/pb) diff --git a/libcockatrice_rng/CMakeLists.txt b/libcockatrice_rng/CMakeLists.txt index b988c9d2f..d585bd88b 100644 --- a/libcockatrice_rng/CMakeLists.txt +++ b/libcockatrice_rng/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "libcockatrice_rng" directory + set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/libcockatrice_settings/CMakeLists.txt b/libcockatrice_settings/CMakeLists.txt index 80a465b6d..a657f1430 100644 --- a/libcockatrice_settings/CMakeLists.txt +++ b/libcockatrice_settings/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "libcockatrice_settings" directory + set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) diff --git a/libcockatrice_utility/CMakeLists.txt b/libcockatrice_utility/CMakeLists.txt index db23f7951..9b775054e 100644 --- a/libcockatrice_utility/CMakeLists.txt +++ b/libcockatrice_utility/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.16) +# CMakeLists for "libcockatrice_utility" directory + project(Utility VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") set(CMAKE_AUTOMOC ON) diff --git a/oracle/CMakeLists.txt b/oracle/CMakeLists.txt index 392184b6e..372acca05 100644 --- a/oracle/CMakeLists.txt +++ b/oracle/CMakeLists.txt @@ -1,4 +1,7 @@ -cmake_minimum_required(VERSION 3.16) +# CMakeLists for "oracle" directory +# +# Provides the Oracle binary + project(Oracle VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") # ------------------------ diff --git a/servatrice/CMakeLists.txt b/servatrice/CMakeLists.txt index 68e422d8c..5de9d2092 100644 --- a/servatrice/CMakeLists.txt +++ b/servatrice/CMakeLists.txt @@ -1,9 +1,12 @@ -# CMakeLists for servatrice directory +# CMakeLists for "servatrice" directory # -# provides the servatrice binary +# Provides the Servatrice binary project(Servatrice VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") +# ------------------------ +# Paths and directories +# ------------------------ set(servatrice_SOURCES src/email_parser.cpp src/event_loop_watchdog.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4f5dc88eb..6fcf56501 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "tests" directory + # NOTE: Qt modules for tests are defined centrally in cmake/FindQtRuntime.cmake (the _TEST_NEEDED variable). # If a new test needs additional Qt modules, add them there — not in individual test CMakeLists.txt files. enable_testing() @@ -20,8 +22,6 @@ add_test(NAME metrics_registry_test COMMAND metrics_registry_test) add_test(NAME deck_hash_performance_test COMMAND deck_hash_performance_test) set_tests_properties(deck_hash_performance_test PROPERTIES TIMEOUT 15) -# Find GTest - add_executable(dummy_test dummy_test.cpp) add_executable(expression_test expression_test.cpp) add_executable(clamped_arithmetic_test clamped_arithmetic_test.cpp) @@ -39,6 +39,7 @@ target_include_directories(lag_monitor_test PRIVATE ${CMAKE_SOURCE_DIR}/cockatri add_executable(latency_tracker_test latency_tracker_test.cpp) add_executable(metrics_registry_test ../servatrice/src/metrics_registry.cpp metrics_registry_test.cpp) +# Find GTest find_package(GTest) if(NOT GTEST_FOUND) diff --git a/tests/card_zone_algorithms/CMakeLists.txt b/tests/card_zone_algorithms/CMakeLists.txt index e03d8f77d..f5cb7163c 100644 --- a/tests/card_zone_algorithms/CMakeLists.txt +++ b/tests/card_zone_algorithms/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "card_zone_algorithms" directory + add_executable(card_zone_algorithms_test card_zone_algorithms_test.cpp) target_include_directories(card_zone_algorithms_test PRIVATE ${CMAKE_SOURCE_DIR}/cockatrice/src/game/zones) diff --git a/tests/carddatabase/CMakeLists.txt b/tests/carddatabase/CMakeLists.txt index 811cebc1d..5629fffd0 100644 --- a/tests/carddatabase/CMakeLists.txt +++ b/tests/carddatabase/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.16) +# CMakeLists for "carddatabase" directory + project(CardDatabaseTests VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") # ------------------------ diff --git a/tests/deck_list_model/CMakeLists.txt b/tests/deck_list_model/CMakeLists.txt index e3096c559..f2a881396 100644 --- a/tests/deck_list_model/CMakeLists.txt +++ b/tests/deck_list_model/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "deck_list_model" directory + add_executable(deck_list_model_custom_zones_test ${VERSION_STRING_CPP} deck_list_model_custom_zones_test.cpp) if(NOT GTEST_FOUND) diff --git a/tests/deck_list_zones/CMakeLists.txt b/tests/deck_list_zones/CMakeLists.txt index 0710be94d..50c88aeb3 100644 --- a/tests/deck_list_zones/CMakeLists.txt +++ b/tests/deck_list_zones/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "deck_list_zones" directory + add_executable(deck_list_zones_test deck_list_zones_test.cpp) if(NOT GTEST_FOUND) diff --git a/tests/loading_from_clipboard/CMakeLists.txt b/tests/loading_from_clipboard/CMakeLists.txt index 719d62f45..2967aab3d 100644 --- a/tests/loading_from_clipboard/CMakeLists.txt +++ b/tests/loading_from_clipboard/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "loading_from_clipboard" directory + add_definitions("-DCARDDB_DATADIR=\"${CMAKE_CURRENT_SOURCE_DIR}/data/\"") add_executable(loading_from_clipboard_test ${VERSION_STRING_CPP} clipboard_testing.cpp loading_from_clipboard_test.cpp) diff --git a/tests/movecard_tests/CMakeLists.txt b/tests/movecard_tests/CMakeLists.txt index 769047148..715799f90 100755 --- a/tests/movecard_tests/CMakeLists.txt +++ b/tests/movecard_tests/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "movecard_tests" directory + add_executable(reverse_card_move_test reverse_card_move_test.cpp) if(NOT GTEST_FOUND) diff --git a/tests/oracle/CMakeLists.txt b/tests/oracle/CMakeLists.txt index 9bc5ee5be..40adbd9b6 100644 --- a/tests/oracle/CMakeLists.txt +++ b/tests/oracle/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "oracle" directory + add_executable(parse_cipt_test ../../oracle/src/parsehelpers.cpp parse_cipt_test.cpp) if(NOT GTEST_FOUND) diff --git a/tests/settings/CMakeLists.txt b/tests/settings/CMakeLists.txt index 7ee32a645..293150125 100644 --- a/tests/settings/CMakeLists.txt +++ b/tests/settings/CMakeLists.txt @@ -1,3 +1,5 @@ +# CMakeLists for "settings" directory + add_executable(settings_manager_test settings_manager_test.cpp) add_executable(settings_defaults_test settings_defaults_test.cpp) add_executable(settings_migration_test settings_migration_test.cpp)