Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
CMakeLists pass windows sources (manifest and resource file) to execu…
…table targets separately from common_SRCS
  • Loading branch information
nOOb3167 authored and SmallJoker committed Feb 23, 2018
1 parent 5741811 commit cbf891e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Expand Up @@ -471,9 +471,9 @@ if(WIN32)
-o ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${WINRESOURCE_FILE})
SET(common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o)
SET(extra_windows_SRCS ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o)
else(MINGW) # Probably MSVC
set(common_SRCS ${common_SRCS} ${WINRESOURCE_FILE} ${MINETEST_EXE_MANIFEST_FILE})
set(extra_windows_SRCS ${WINRESOURCE_FILE} ${MINETEST_EXE_MANIFEST_FILE})
endif(MINGW)
endif()

Expand Down Expand Up @@ -561,7 +561,7 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")


if(BUILD_CLIENT)
add_executable(${PROJECT_NAME} ${client_SRCS})
add_executable(${PROJECT_NAME} ${client_SRCS} ${extra_windows_SRCS})
add_dependencies(${PROJECT_NAME} GenerateVersion)
set(client_LIBS
${PROJECT_NAME}
Expand Down Expand Up @@ -629,7 +629,7 @@ endif(BUILD_CLIENT)


if(BUILD_SERVER)
add_executable(${PROJECT_NAME}server ${server_SRCS})
add_executable(${PROJECT_NAME}server ${server_SRCS} ${extra_windows_SRCS})
add_dependencies(${PROJECT_NAME}server GenerateVersion)
target_link_libraries(
${PROJECT_NAME}server
Expand Down

0 comments on commit cbf891e

Please sign in to comment.