Skip to content

Commit cbf891e

Browse files
nOOb3167SmallJoker
authored andcommittedFeb 23, 2018
CMakeLists pass windows sources (manifest and resource file) to executable targets separately from common_SRCS
1 parent 5741811 commit cbf891e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

Diff for: ‎src/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -471,9 +471,9 @@ if(WIN32)
471471
-o ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o
472472
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
473473
DEPENDS ${WINRESOURCE_FILE})
474-
SET(common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o)
474+
SET(extra_windows_SRCS ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o)
475475
else(MINGW) # Probably MSVC
476-
set(common_SRCS ${common_SRCS} ${WINRESOURCE_FILE} ${MINETEST_EXE_MANIFEST_FILE})
476+
set(extra_windows_SRCS ${WINRESOURCE_FILE} ${MINETEST_EXE_MANIFEST_FILE})
477477
endif(MINGW)
478478
endif()
479479

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

562562

563563
if(BUILD_CLIENT)
564-
add_executable(${PROJECT_NAME} ${client_SRCS})
564+
add_executable(${PROJECT_NAME} ${client_SRCS} ${extra_windows_SRCS})
565565
add_dependencies(${PROJECT_NAME} GenerateVersion)
566566
set(client_LIBS
567567
${PROJECT_NAME}
@@ -629,7 +629,7 @@ endif(BUILD_CLIENT)
629629

630630

631631
if(BUILD_SERVER)
632-
add_executable(${PROJECT_NAME}server ${server_SRCS})
632+
add_executable(${PROJECT_NAME}server ${server_SRCS} ${extra_windows_SRCS})
633633
add_dependencies(${PROJECT_NAME}server GenerateVersion)
634634
target_link_libraries(
635635
${PROJECT_NAME}server

0 commit comments

Comments
 (0)
Please sign in to comment.