blob: 3b9f6adbec128c473c216330ea1bdf41f8c639d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Copyright 2020-2022 The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
set(OVERLAY_EXE_RC "${CMAKE_CURRENT_BINARY_DIR}/overlay_exe.rc")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/overlay_exe.rc.in" "${OVERLAY_EXE_RC}")
add_definitions("-DUNICODE" "-DWIN32_LEAN_AND_MEAN")
# We save the output name in a variable because it's used by configure_file()
if(64_BIT AND NOT BUILD_OVERLAY_XCOMPILE)
set(OUTPUT_NAME "mumble_ol_helper_x64")
else()
set(OUTPUT_NAME "mumble_ol_helper")
endif()
if(NOT BUILD_OVERLAY_XCOMPILE)
get_target_property(MUMBLE_SOURCE_DIR mumble SOURCE_DIR)
endif()
add_executable(overlay_exe WIN32
"overlay_exe.cpp"
"overlay_exe.h"
"${MUMBLE_SOURCE_DIR}/mumble.appcompat.manifest"
"${OVERLAY_EXE_RC}"
)
set_target_properties(overlay_exe PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
if(BUILD_OVERLAY_XCOMPILE)
set_target_properties(overlay_exe PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${MUMBLE_BINARY_DIR})
target_include_directories(overlay_exe PRIVATE ${PARENT_SOURCE_DIR}/overlay)
else()
set_target_properties(overlay_exe PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
target_include_directories(overlay_exe PRIVATE ${CMAKE_SOURCE_DIR}/overlay)
install(TARGETS overlay_exe RUNTIME DESTINATION "${MUMBLE_INSTALL_EXECUTABLEDIR}" COMPONENT mumble_client)
endif()
if(MSVC)
set_target_properties(overlay_exe PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
add_dependencies(overlay_exe overlay)
target_link_libraries(overlay_exe PRIVATE Shlwapi.lib)
|