Skip to content

Commit

Permalink
Fix: [CMake] os/windows/openttd.manifest is not a generated file
Browse files Browse the repository at this point in the history
  • Loading branch information
glx22 committed Feb 5, 2021
1 parent a667ed9 commit 99448ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -201,6 +201,11 @@ add_executable(openttd WIN32 ${GENERATED_SOURCE_FILES})
set_target_properties(openttd PROPERTIES OUTPUT_NAME "${BINARY_NAME}")
# All other files are added via target_sources()

if(MSVC)
# Add DPI manifest to project; other WIN32 targets get this via ottdres.rc
target_sources(openttd PRIVATE "${CMAKE_SOURCE_DIR}/os/windows/openttd.manifest")
endif()

add_subdirectory(${CMAKE_SOURCE_DIR}/src)
add_subdirectory(${CMAKE_SOURCE_DIR}/media/baseset)

Expand Down
3 changes: 0 additions & 3 deletions cmake/CompileFlags.cmake
Expand Up @@ -27,9 +27,6 @@ macro(compile_flags)
# Enable multi-threaded compilation.
add_compile_options(/MP)
endif()

# Add DPI manifest to project; other WIN32 targets get this via ottdres.rc
list(APPEND GENERATED_SOURCE_FILES "${CMAKE_SOURCE_DIR}/os/windows/openttd.manifest")
endif()

# Add some -D flags for Debug builds. We cannot use add_definitions(), because
Expand Down

0 comments on commit 99448ee

Please sign in to comment.