Use CMAKE_EXE_LINKER_FLAGS to set link flags on executables.
Just set CMAKE_EXE_LINKER_FLAGS to include ${WS_LINK_FLAGS}, and also set it to include setargv.obj on Windows. This is a bit simpler. Change-Id: Idf9c632d9d3bff1ec6e70396641319155e08aa4f Reviewed-on: https://code.wireshark.org/review/30004 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
1666d89107
commit
84447550ef
|
@ -174,11 +174,10 @@ if(NOT CMAKE_INSTALL_RPATH AND NOT (WIN32 OR APPLE))
|
|||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if(WIN32)
|
||||
# Linking with setargv.obj enables "wildcard expansion" of
|
||||
# command-line arguments.
|
||||
set(WILDCARD_OBJ setargv.obj)
|
||||
set(CMAKE_EXE_LINKER_FLAGS setargv.obj)
|
||||
endif(WIN32)
|
||||
|
||||
# Banner shown at top right of Qt welcome screen.
|
||||
|
@ -1054,6 +1053,8 @@ foreach(PACKAGE ${PACKAGELIST})
|
|||
endif()
|
||||
endforeach()
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${WS_LINK_FLAGS}")
|
||||
|
||||
# Provide Windows system lib names
|
||||
include( UseWinLibs )
|
||||
|
||||
|
@ -2131,7 +2132,6 @@ if(BUILD_wireshark AND QT_FOUND)
|
|||
set_target_properties(wireshark PROPERTIES COMPILE_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
||||
endif()
|
||||
set_target_properties(wireshark PROPERTIES
|
||||
LINK_FLAGS "${WS_LINK_FLAGS}"
|
||||
FOLDER "Executables"
|
||||
)
|
||||
if(ENABLE_APPLICATION_BUNDLE OR WIN32)
|
||||
|
@ -2185,7 +2185,6 @@ endif()
|
|||
# Common properties for CLI executables
|
||||
macro(set_extra_executable_properties _executable _folder)
|
||||
set_target_properties(${_executable} PROPERTIES
|
||||
LINK_FLAGS "${WILDCARD_OBJ} ${WS_LINK_FLAGS}"
|
||||
FOLDER ${_folder}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue