TeaSpeak-Client/native/updater/CMakeLists.txt

34 lines
933 B
CMake
Raw Normal View History

2019-10-25 19:51:40 -04:00
set(MODULE_NAME "updater")
set(SOURCE_FILES
main.cpp
config.cpp
logger.cpp
json.hpp
util.cpp
file.cpp
)
2020-04-22 14:01:29 -04:00
if (WIN32)
list(APPEND SOURCE_FILES win32/retry_ui.cpp win32/Resource.rc)
2020-06-13 09:05:49 -04:00
else()
list(APPEND SOURCE_FILES unix/block_info.cpp)
endif()
2020-04-22 14:01:29 -04:00
2019-10-25 19:51:40 -04:00
add_executable(update_installer ${SOURCE_FILES})
if(WIN32)
2020-04-22 14:01:29 -04:00
target_link_libraries(update_installer kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;Shlwapi.lib;Rstrtmgr.lib)
2019-10-25 19:51:40 -04:00
add_custom_command(TARGET update_installer POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy "$<TARGET_FILE:update_installer>" "${EXE_DIRECTORY}/update-installer.exe"
)
else()
target_link_libraries(update_installer libstdc++fs.a)
add_custom_command(TARGET update_installer POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy "$<TARGET_FILE:update_installer>" "${EXE_DIRECTORY}/update-installer"
)
endif()