1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-11-24 07:42:46 +01:00
Nextcloud-Desktop/admin/win/tools/NCMsiHelper/CMakeLists.txt
Michael Schuster e024aa3f16
Windows: Win32 migration tools code review
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-09-21 16:40:19 +02:00

42 lines
943 B
CMake

# Find WiX Toolset
if(NOT DEFINED ENV{WIX})
# Example: WIX=C:\Program Files (x86)\WiX Toolset v3.11\
message(FATAL_ERROR "WiX Toolset path not set (environment variable 'WIX'). Please install the WiX Toolset.")
else()
set(WIX_SDK_PATH $ENV{WIX}/SDK/VS2017)
message(STATUS "WiX Toolset SDK path: ${WIX_SDK_PATH}")
endif()
include_directories(${WIX_SDK_PATH}/inc)
if(CMAKE_SIZEOF_VOID_P MATCHES 4)
link_directories(${WIX_SDK_PATH}/lib/x86)
else()
link_directories(${WIX_SDK_PATH}/lib/x64)
endif()
add_definitions(-D_NCMSIHELPER_EXPORTS)
add_definitions(-D_USRDLL)
add_definitions(-D_WINDLL)
set(TARGET_NAME NCMsiHelper${BITNESS})
add_library(${TARGET_NAME} MODULE
CustomAction.cpp
CustomAction.def
LogResult.cpp
NCMsiHelper.cpp
)
target_link_libraries(${TARGET_NAME}
NCToolsShared
)
install(TARGETS ${TARGET_NAME}
DESTINATION msi/
)
install(FILES
NCMsiHelper.wxs
DESTINATION msi/
)