Build: Automatically include WindowsSettings.manifest in all executables instead of listing it separately as source file in every target

This commit is contained in:
Shauren
2024-09-15 12:55:50 +02:00
parent 052f2d0a81
commit a21e7c738e
9 changed files with 5 additions and 18 deletions

View File

@@ -8,3 +8,8 @@ target_compile_definitions(trinity-compile-option-interface
# set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/$<CONFIG>")
# add WindowsSettings.manifest to all executables
target_sources(trinity-core-interface
INTERFACE
$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:${CMAKE_SOURCE_DIR}/cmake/platform/win/WindowsSettings.manifest>)

View File

@@ -8,12 +8,6 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
if(WIN32 AND MSVC)
set(sources_windows
${CMAKE_SOURCE_DIR}/src/common/WindowsSettings.manifest
)
endif()
add_subdirectory(genrev)
add_subdirectory(common)

View File

@@ -16,8 +16,6 @@ CollectSourceFiles(
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
list(APPEND PRIVATE_SOURCES ${sources_windows})
if (WIN32)
if (MSVC)
list(APPEND PRIVATE_SOURCES bnetserver.rc)

View File

@@ -14,8 +14,6 @@ CollectSourceFiles(
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
list(APPEND PRIVATE_SOURCES ${sources_windows})
if(WIN32)
if(MSVC)
list(APPEND PRIVATE_SOURCES worldserver.rc)

View File

@@ -12,8 +12,6 @@ CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES)
list(APPEND PRIVATE_SOURCES ${sources_windows})
add_executable(mapextractor
${PRIVATE_SOURCES}
)

View File

@@ -12,8 +12,6 @@ CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES)
list(APPEND PRIVATE_SOURCES ${sources_windows})
add_executable(mmaps_generator ${PRIVATE_SOURCES})
target_link_libraries(mmaps_generator

View File

@@ -13,8 +13,6 @@ set(PRIVATE_SOURCES
TileAssembler.h
VMapAssembler.cpp)
list(APPEND PRIVATE_SOURCES ${sources_windows})
add_executable(vmap4assembler ${PRIVATE_SOURCES})
target_link_libraries(vmap4assembler

View File

@@ -12,8 +12,6 @@ CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES)
list(APPEND PRIVATE_SOURCES ${sources_windows})
add_executable(vmap4extractor ${PRIVATE_SOURCES})
target_link_libraries(vmap4extractor