Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
stenzek
GitHub Repository: stenzek/duckstation
Path: blob/master/src/updater/CMakeLists.txt
7520 views
1
add_executable(updater
2
updater.cpp
3
updater.h
4
)
5
6
target_include_directories(updater PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
7
target_link_libraries(updater PRIVATE common minizip ZLIB::ZLIB)
8
9
if(WIN32)
10
target_sources(updater PRIVATE
11
resource.h
12
updater.manifest
13
updater.rc
14
updater_progress_callback.h
15
win32_main.cpp
16
win32_progress_callback.cpp
17
win32_progress_callback.h
18
win32_window_util.cpp
19
win32_window_util.h
20
../duckstation-qt/vcruntimecheck.cpp
21
)
22
target_link_libraries(updater PRIVATE "Comctl32.lib")
23
set_target_properties(updater PROPERTIES WIN32_EXECUTABLE TRUE)
24
endif()
25
26
if(APPLE)
27
set(MAC_SOURCES
28
cocoa_main.mm
29
cocoa_progress_callback.mm
30
cocoa_progress_callback.h
31
updater_progress_callback.h
32
)
33
target_sources(updater PRIVATE ${MAC_SOURCES})
34
set_source_files_properties(${MAC_SOURCES} PROPERTIES SKIP_PRECOMPILE_HEADERS TRUE)
35
find_library(COCOA_LIBRARY Cocoa REQUIRED)
36
target_link_libraries(updater PRIVATE ${COCOA_LIBRARY})
37
38
if(NOT CMAKE_GENERATOR MATCHES "Xcode" AND NOT SKIP_POSTPROCESS_BUNDLE)
39
set_target_properties(updater PROPERTIES OUTPUT_NAME "Updater")
40
set_target_properties(updater PROPERTIES
41
MACOSX_BUNDLE true
42
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
43
OUTPUT_NAME Updater
44
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/DuckStation.app/Contents/Resources
45
)
46
47
# Copy icon into the bundle
48
target_sources(updater PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/Updater.icns")
49
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/Updater.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
50
endif()
51
endif()
52
53