sq epan/dissectors/packet-dcerpc-netlogon.c
[wireshark-sm.git] / cmake / modules / UseExecutableResources.cmake
blob8eeb4a790ecc2cac74508085116cca304d4bab8b
1 # Sets RC information on Windows.
2 # UNIQUE_RC - Use if the program has its own .rc.in file. Otherwise cli_template.rc.in will be used.
3 # EXE_NAME - The lowercase executable base name.
4 # PROGRAM_NAME - The program's proper, capitalized name.
5 # COPYRIGHT_INFO - Year followed by copyright holder names if different from default.
6 function(set_executable_resources EXE_NAME PROGRAM_NAME)
7         if (WIN32)
8                 set(options UNIQUE_RC)
9                 set(one_value_args COPYRIGHT_INFO)
10                 cmake_parse_arguments(EXE_RC "${options}" "${one_value_args}" "" ${ARGN} )
11                 if (EXE_RC_COPYRIGHT_INFO)
12                         set(COPYRIGHT_INFO "${EXE_RC_COPYRIGHT_INFO}")
13                 else()
14                         # Use the original Wireshark / TShark .rc copyright.
15                         set(COPYRIGHT_INFO "2000 Gerald Combs <gerald@wireshark.org>, Gilbert Ramirez <gram@alumni.rice.edu> and many others")
16                 endif()
17                 set(${EXE_NAME}_FILES ${${EXE_NAME}_FILES} ${CMAKE_BINARY_DIR}/resources/${EXE_NAME}.rc PARENT_SCOPE)
18                 if (EXE_RC_UNIQUE_RC)
19                         set (_in_file ${EXE_NAME})
20                 else()
21                         set (_in_file "cli_template")
22                 endif()
23                 set(ICON_PATH "${CMAKE_SOURCE_DIR}/resources/icons/")
24                 configure_file( ${CMAKE_SOURCE_DIR}/resources/${_in_file}.rc.in ${CMAKE_BINARY_DIR}/resources/${EXE_NAME}.rc @ONLY )
25         endif()
26 endfunction()