commit bd8f0e81e774c8241b5bd985fe5563b302834db9
Author: Alex Mayfield <alexmax2742@gmail.com>
AuthorDate: Mon May 21 18:29:14 2018 -0400
Commit: Alex Mayfield <alexmax2742@gmail.com>
CommitDate: Mon May 21 18:29:14 2018 -0400
Fix setup executable rc and manifest files
---
CMakeLists.txt | 3 +++
src/CMakeLists.txt | 13 +++++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14099ef6..abb073f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,7 @@ project("Chocolate Doom" VERSION 3.0.0 LANGUAGES C)
# Autotools variables
set(top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+set(top_builddir ${CMAKE_CURRENT_BINARY_DIR})
# AC_INIT variables
set(PACKAGE_NAME "${PROJECT_NAME}")
@@ -36,6 +37,8 @@ set(PROGRAM_PREFIX "${PROGRAM_SPREFIX}-")
configure_file(config.h.cin config.h)
configure_file(src/resource.rc.in src/resource.rc)
+configure_file(src/setup-res.rc.in src/setup-res.rc)
+configure_file(src/setup/setup-manifest.xml.in src/setup/setup-manifest.xml)
foreach(SUBDIR textscreen midiproc opl pcsound src)
add_subdirectory("${SUBDIR}")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8632da44..2615893b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -183,12 +183,17 @@ set(SETUP_FILES
net_structrw.c net_structrw.h
z_native.c z_zone.h)
-#if(WIN32)
- #add_executable("${PROGRAM_PREFIX}setup" ${SETUP_FILES} ${COMMON_SOURCE_FILES} "${CMAKE_CURRENT_BINARY_DIR}/setup-res.rc")
-#else()
+if(WIN32)
+ add_executable("${PROGRAM_PREFIX}setup" ${SETUP_FILES} ${COMMON_SOURCE_FILES} "${CMAKE_CURRENT_BINARY_DIR}/setup-res.rc")
+else()
add_executable("${PROGRAM_PREFIX}setup" ${SETUP_FILES} ${COMMON_SOURCE_FILES})
-#endif()
+endif()
target_include_directories("${PROGRAM_PREFIX}setup"
PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/../")
target_link_libraries("${PROGRAM_PREFIX}setup" setup textscreen SDL2::SDL2main SDL2::SDL2 SDL2::mixer SDL2::net)
+
+if(MSVC)
+ set_target_properties("${PROGRAM_PREFIX}setup" PROPERTIES
+ LINK_FLAGS "/MANIFEST:NO")
+endif()