From c43b41e183e481d1a08267771ee5073b76962b95 Mon Sep 17 00:00:00 2001 From: Ronald Kinard Date: Sun, 8 Mar 2015 04:30:07 -0500 Subject: [PATCH] Fix generation of SRB2DD target. It still won't compile correctly. But this should avoid the error messages related to it. --- src/win32/CMakeLists.txt | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/win32/CMakeLists.txt b/src/win32/CMakeLists.txt index 94c198299..39b01588b 100644 --- a/src/win32/CMakeLists.txt +++ b/src/win32/CMakeLists.txt @@ -1,11 +1,18 @@ -add_executable(${SRB2_WIN_EXE_NAME} EXCLUDE_FROM_ALL - ${SRB2_CORE_SOURCES} - ${SRB2_CORE_HEADERS} - ${SRB2_LUA_SOURCES} - ${SRB2_LUA_HEADERS} - ${SRB2_BLUA_SOURCES} - ${SRB2_BLUA_HEADERS}) +file(GLOB SRB2_WIN_SOURCES *.c *.h *.rc) -target_compile_definitions(${SRB2_WIN_EXE_NAME} PRIVATE +if(${SRB2_CONFIG_HWRENDER}) + set(SRB2_WIN_SOURCES ${SRB2_WIN_SOURCES} ${SRB2_HWRENDER_SOURCES} ${SRB2_HWRENDER_HEADERS}) + set(SRB2_WIN_SOURCES ${SRB2_WIN_SOURCES} ${SRB2_R_OPENGL_SOURCES} ${SRB2_R_OPENGL_HEADERS}) +endif() + +add_executable(SRB2DD EXCLUDE_FROM_ALL WIN32 + ${SRB2_WIN_SOURCES} +) + +target_compile_definitions(SRB2DD PRIVATE -D_WINDOWS -) \ No newline at end of file +) + +set_target_properties(SRB2DD PROPERTIES OUTPUT_NAME ${SRB2_WIN_EXE_NAME}) + +target_link_libraries(SRB2DD PRIVATE SRB2Core)