summaryrefslogtreecommitdiff
path: root/indra/win_updater/CMakeLists.txt
blob: 69ec7a1e49ae01bd4feb881ecb82b47386a799a0 (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
# -*- cmake -*-

project(win_updater)

include(00-Common)
include(LLCommon)
include(Linking)

# *HACK - override msvcrt implementation (intialized on 00-Common) to be
# statically linked for the installer this relies on vc taking the last flag on
# the command line
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")

include_directories(
    ${LLCOMMON_INCLUDE_DIRS}
    )

set(win_updater_SOURCE_FILES updater.cpp)

set(win_updater_HEADER_FILES CMakeLists.txt)

set_source_files_properties(${win_updater_HEADER_FILES}
                            PROPERTIES HEADER_FILE_ONLY TRUE)

list(APPEND win_updater_SOURCE_FILES ${win_updater_HEADER_FILES})

add_executable(windows-updater WIN32 ${win_updater_SOURCE_FILES})

target_link_libraries(windows-updater
    wininet
    user32
    gdi32
    shell32
    )

set_target_properties(windows-updater
    PROPERTIES
    LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
    LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;MSVCRT\""
    )

# The windows-updater doesn't link against anything non-system, apparently
#ll_deploy_sharedlibs_command(windows-updater)