Codechange: Pass GRFConfig by reference where feasible. (#13388)
[openttd-github.git] / bin / ai / CMakeLists.txt
blob8b54f749735977a0af142a8e2ee38995d34756f4
1 set(AI_COMPAT_SOURCE_FILES
2         ${CMAKE_CURRENT_SOURCE_DIR}/compat_0.7.nut
3         ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.0.nut
4         ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.1.nut
5         ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.2.nut
6         ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.3.nut
7         ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.4.nut
8         ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.5.nut
9         ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.6.nut
10         ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.7.nut
11         ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.8.nut
12         ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.9.nut
13         ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.10.nut
14         ${CMAKE_CURRENT_SOURCE_DIR}/compat_1.11.nut
15         ${CMAKE_CURRENT_SOURCE_DIR}/compat_12.nut
16         ${CMAKE_CURRENT_SOURCE_DIR}/compat_13.nut
17         ${CMAKE_CURRENT_SOURCE_DIR}/compat_14.nut
18         ${CMAKE_CURRENT_SOURCE_DIR}/compat_15.nut
21 foreach(AI_COMPAT_SOURCE_FILE IN LISTS AI_COMPAT_SOURCE_FILES)
22     string(REPLACE "${CMAKE_SOURCE_DIR}/bin/" "" AI_COMPAT_SOURCE_FILE_NAME "${AI_COMPAT_SOURCE_FILE}")
23     string(CONCAT AI_COMPAT_BINARY_FILE "${CMAKE_BINARY_DIR}/" "${AI_COMPAT_SOURCE_FILE_NAME}")
25     add_custom_command(OUTPUT ${AI_COMPAT_BINARY_FILE}
26             COMMAND ${CMAKE_COMMAND} -E copy
27                     ${AI_COMPAT_SOURCE_FILE}
28                     ${AI_COMPAT_BINARY_FILE}
29             MAIN_DEPENDENCY ${AI_COMPAT_SOURCE_FILE}
30             COMMENT "Copying ${AI_COMPAT_SOURCE_FILE_NAME}"
31     )
33     list(APPEND AI_COMPAT_BINARY_FILES ${AI_COMPAT_BINARY_FILE})
34 endforeach()
36 # Create a new target which copies all compat files
37 add_custom_target(ai_compat_files
38         DEPENDS ${AI_COMPAT_BINARY_FILES}
41 add_dependencies(openttd
42     ai_compat_files