diff options
Diffstat (limited to 'src/table')
-rw-r--r-- | src/table/CMakeLists.txt | 48 | ||||
-rw-r--r-- | src/table/settings/CMakeLists.txt | 47 | ||||
-rw-r--r-- | src/table/settings/company_settings.ini (renamed from src/table/company_settings.ini) | 0 | ||||
-rw-r--r-- | src/table/settings/currency_settings.ini (renamed from src/table/currency_settings.ini) | 0 | ||||
-rw-r--r-- | src/table/settings/gameopt_settings.ini (renamed from src/table/gameopt_settings.ini) | 0 | ||||
-rw-r--r-- | src/table/settings/misc_settings.ini (renamed from src/table/misc_settings.ini) | 0 | ||||
-rw-r--r-- | src/table/settings/settings.ini (renamed from src/table/settings.ini) | 0 | ||||
-rw-r--r-- | src/table/settings/win32_settings.ini (renamed from src/table/win32_settings.ini) | 0 | ||||
-rw-r--r-- | src/table/settings/window_settings.ini (renamed from src/table/window_settings.ini) | 0 |
9 files changed, 48 insertions, 47 deletions
diff --git a/src/table/CMakeLists.txt b/src/table/CMakeLists.txt index bb2311cf1..c4043681b 100644 --- a/src/table/CMakeLists.txt +++ b/src/table/CMakeLists.txt @@ -1,50 +1,4 @@ -set(GENERATED_BINARY_DIR ${CMAKE_BINARY_DIR}/generated) -set(TABLE_BINARY_DIR ${GENERATED_BINARY_DIR}/table) - -set(TABLE_INI_SOURCE_FILES - ${CMAKE_CURRENT_SOURCE_DIR}/company_settings.ini - ${CMAKE_CURRENT_SOURCE_DIR}/currency_settings.ini - ${CMAKE_CURRENT_SOURCE_DIR}/gameopt_settings.ini - ${CMAKE_CURRENT_SOURCE_DIR}/misc_settings.ini - ${CMAKE_CURRENT_SOURCE_DIR}/settings.ini - ${CMAKE_CURRENT_SOURCE_DIR}/win32_settings.ini - ${CMAKE_CURRENT_SOURCE_DIR}/window_settings.ini -) - -if (HOST_BINARY_DIR) - include(${HOST_BINARY_DIR}/settingsgen.cmake) -endif() - -# Generate a command and target to create the settings table -add_custom_command_timestamp(OUTPUT ${TABLE_BINARY_DIR}/settings.h - COMMAND ${CMAKE_COMMAND} -E make_directory ${TABLE_BINARY_DIR} - COMMAND settingsgen - -o ${TABLE_BINARY_DIR}/settings.h - -b ${CMAKE_SOURCE_DIR}/src/table/settings.h.preamble - -a ${CMAKE_SOURCE_DIR}/src/table/settings.h.postamble - ${TABLE_INI_SOURCE_FILES} - DEPENDS settingsgen ${TABLE_INI_SOURCE_FILES} - ${CMAKE_SOURCE_DIR}/src/table/settings.h.preamble - ${CMAKE_SOURCE_DIR}/src/table/settings.h.postamble - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Generating table/settings.h" -) -add_custom_target_timestamp(table_settings - DEPENDS - ${TABLE_BINARY_DIR}/settings.h -) - -add_library(settings - INTERFACE -) -target_include_directories(settings - INTERFACE - ${GENERATED_BINARY_DIR} -) -add_dependencies(settings - table_settings -) -add_library(openttd::settings ALIAS settings) +add_subdirectory(settings) add_files( airport_defaults.h diff --git a/src/table/settings/CMakeLists.txt b/src/table/settings/CMakeLists.txt new file mode 100644 index 000000000..b1503145f --- /dev/null +++ b/src/table/settings/CMakeLists.txt @@ -0,0 +1,47 @@ +set(GENERATED_BINARY_DIR ${CMAKE_BINARY_DIR}/generated) +set(TABLE_BINARY_DIR ${GENERATED_BINARY_DIR}/table) + +set(TABLE_INI_SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/company_settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/currency_settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/gameopt_settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/misc_settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/win32_settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/window_settings.ini +) + +if (HOST_BINARY_DIR) + include(${HOST_BINARY_DIR}/settingsgen.cmake) +endif() + +# Generate a command and target to create the settings table +add_custom_command_timestamp(OUTPUT ${TABLE_BINARY_DIR}/settings.h + COMMAND ${CMAKE_COMMAND} -E make_directory ${TABLE_BINARY_DIR} + COMMAND settingsgen + -o ${TABLE_BINARY_DIR}/settings.h + -b ${CMAKE_SOURCE_DIR}/src/table/settings.h.preamble + -a ${CMAKE_SOURCE_DIR}/src/table/settings.h.postamble + ${TABLE_INI_SOURCE_FILES} + DEPENDS settingsgen ${TABLE_INI_SOURCE_FILES} + ${CMAKE_SOURCE_DIR}/src/table/settings.h.preamble + ${CMAKE_SOURCE_DIR}/src/table/settings.h.postamble + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating table/settings.h" +) +add_custom_target_timestamp(table_settings + DEPENDS + ${TABLE_BINARY_DIR}/settings.h +) + +add_library(settings + INTERFACE +) +target_include_directories(settings + INTERFACE + ${GENERATED_BINARY_DIR} +) +add_dependencies(settings + table_settings +) +add_library(openttd::settings ALIAS settings) diff --git a/src/table/company_settings.ini b/src/table/settings/company_settings.ini index bb104adeb..bb104adeb 100644 --- a/src/table/company_settings.ini +++ b/src/table/settings/company_settings.ini diff --git a/src/table/currency_settings.ini b/src/table/settings/currency_settings.ini index ce0213758..ce0213758 100644 --- a/src/table/currency_settings.ini +++ b/src/table/settings/currency_settings.ini diff --git a/src/table/gameopt_settings.ini b/src/table/settings/gameopt_settings.ini index b3b7ec651..b3b7ec651 100644 --- a/src/table/gameopt_settings.ini +++ b/src/table/settings/gameopt_settings.ini diff --git a/src/table/misc_settings.ini b/src/table/settings/misc_settings.ini index 1b633a65a..1b633a65a 100644 --- a/src/table/misc_settings.ini +++ b/src/table/settings/misc_settings.ini diff --git a/src/table/settings.ini b/src/table/settings/settings.ini index 3c22ec4c1..3c22ec4c1 100644 --- a/src/table/settings.ini +++ b/src/table/settings/settings.ini diff --git a/src/table/win32_settings.ini b/src/table/settings/win32_settings.ini index 6b7d5276d..6b7d5276d 100644 --- a/src/table/win32_settings.ini +++ b/src/table/settings/win32_settings.ini diff --git a/src/table/window_settings.ini b/src/table/settings/window_settings.ini index 560a197ab..560a197ab 100644 --- a/src/table/window_settings.ini +++ b/src/table/settings/window_settings.ini |