Skip to content

Commit

Permalink
Add rc file to VS+cmake configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pentarctagon committed Jun 28, 2021
1 parent 45625b0 commit 67d6e1b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ else()
add_definitions(-D_WIN32_WINNT=_WIN32_WINNT_WIN7 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -DNOMINMAX)

set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG_LUA")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:MSVCRT")

# -DNDEBUG is automatically added to all release build types, so manually remove this define from the related variables
Expand Down
8 changes: 6 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ endif()

if(ENABLE_GAME)
if(WIN32)
add_executable(wesnoth WIN32 wesnoth.cpp)
add_executable(wesnoth WIN32 wesnoth.cpp ../packaging/windows/wesnoth.rc)
target_link_options(wesnoth PRIVATE /WX /WHOLEARCHIVE:wesnoth-widgets)
elseif(APPLE)
add_executable(wesnoth wesnoth.cpp macosx/SDLMain.mm)
Expand Down Expand Up @@ -230,7 +230,11 @@ endif()
if(ENABLE_SERVER)
GetSources("wesnothd" wesnothd_sources)

add_executable(wesnothd ${wesnothd_sources})
if(WIN32)
add_executable(wesnothd ${wesnothd_sources} ../packaging/windows/wesnothd.rc)
else()
add_executable(wesnothd ${wesnothd_sources})
endif()

if(ENABLE_MYSQL)
target_include_directories(wesnothd SYSTEM PRIVATE ${MYSQL_CFLAGS})
Expand Down

0 comments on commit 67d6e1b

Please sign in to comment.