diff --git a/CMakeLists.txt b/CMakeLists.txt index a743ad4fee..a9853317fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,10 @@ if(WIN32) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/properties.rc.cmakein ${SCOPY_WIN32_RESOURCES} @ONLY) endif() +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + include(ScopyWindows) +endif() + find_path( IIO_INCLUDE_DIRS NAMES iio.h @@ -194,7 +198,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/translations DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}) endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - include(ScopyWindows) duplicate_target(${PROJECT_NAME} Scopy-console) set_target_properties(Scopy-console PROPERTIES WIN32_EXECUTABLE FALSE) endif() diff --git a/cmake/Modules/ScopyWindows.cmake b/cmake/Modules/ScopyWindows.cmake index dfa977a1d0..87cb64c31d 100644 --- a/cmake/Modules/ScopyWindows.cmake +++ b/cmake/Modules/ScopyWindows.cmake @@ -23,6 +23,10 @@ macro(duplicate_target ORIGINAL NEW) target_compile_options(${NEW} PRIVATE ${original_options}) endmacro() + +set(PLUGIN_COMPONENTS "") +set(PLUGIN_COMPONENTS_FILES "") + function(ConfigureInstallerSettings PROJECT_NAME PLUGIN_INSTALLER_DESCRIPTION FIXED) set(PLUGIN_COMPONENTS diff --git a/plugins/adc/CMakeLists.txt b/plugins/adc/CMakeLists.txt index 5840bcf138..41394ec8a7 100644 --- a/plugins/adc/CMakeLists.txt +++ b/plugins/adc/CMakeLists.txt @@ -74,8 +74,8 @@ target_link_libraries( ) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(INSTALLER_DESCRIPTION ${PLUGIN_DISPLAY_NAME}" "${PLUGIN_DESCRIPTION}) - configureinstallersettings(${PROJECT_NAME} ${INSTALLER_DESCRIPTION} "fixed") + set(INSTALLER_DESCRIPTION "${PLUGIN_DISPLAY_NAME} ${PLUGIN_DESCRIPTION}") + configureinstallersettings(${SCOPY_MODULE} ${INSTALLER_DESCRIPTION} "fixed") endif() set(ADC_TARGET_NAME ${PROJECT_NAME} PARENT_SCOPE) diff --git a/plugins/datalogger/CMakeLists.txt b/plugins/datalogger/CMakeLists.txt index c7668eed8b..179ba3038f 100644 --- a/plugins/datalogger/CMakeLists.txt +++ b/plugins/datalogger/CMakeLists.txt @@ -101,8 +101,8 @@ target_link_libraries( ) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(INSTALLER_DESCRIPTION ${PLUGIN_DISPLAY_NAME}" "${PLUGIN_DESCRIPTION}) - configureinstallersettings(${PROJECT_NAME} ${INSTALLER_DESCRIPTION} "fixed") + set(INSTALLER_DESCRIPTION "${PLUGIN_DISPLAY_NAME} ${PLUGIN_DESCRIPTION}") + configureinstallersettings(${SCOPY_MODULE} ${INSTALLER_DESCRIPTION} "fixed") endif() set(DATALOGGER_TARGET_NAME ${PROJECT_NAME} PARENT_SCOPE) diff --git a/plugins/debugger/CMakeLists.txt b/plugins/debugger/CMakeLists.txt index 6adc4a32c4..2b01f55e02 100644 --- a/plugins/debugger/CMakeLists.txt +++ b/plugins/debugger/CMakeLists.txt @@ -81,8 +81,8 @@ target_link_libraries( ) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(INSTALLER_DESCRIPTION ${PLUGIN_DISPLAY_NAME}" "${PLUGIN_DESCRIPTION}) - configureinstallersettings(${PROJECT_NAME} ${INSTALLER_DESCRIPTION} "fixed") + set(INSTALLER_DESCRIPTION "${PLUGIN_DISPLAY_NAME} ${PLUGIN_DESCRIPTION}") + configureinstallersettings(${SCOPY_MODULE} ${INSTALLER_DESCRIPTION} "fixed") endif() set(DEBUGGER_TARGET_NAME ${PROJECT_NAME} PARENT_SCOPE) diff --git a/plugins/m2k/CMakeLists.txt b/plugins/m2k/CMakeLists.txt index 3b6009812a..cb3e7cea8a 100644 --- a/plugins/m2k/CMakeLists.txt +++ b/plugins/m2k/CMakeLists.txt @@ -135,8 +135,8 @@ target_link_libraries( ) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(INSTALLER_DESCRIPTION ${PLUGIN_DISPLAY_NAME}" "${PLUGIN_DESCRIPTION}) - configureinstallersettings(${PROJECT_NAME} ${INSTALLER_DESCRIPTION} "fixed") + set(INSTALLER_DESCRIPTION "${PLUGIN_DISPLAY_NAME} ${PLUGIN_DESCRIPTION}") + configureinstallersettings(${SCOPY_MODULE} ${INSTALLER_DESCRIPTION} "fixed") endif() set(M2K_TARGET_NAME ${PROJECT_NAME} PARENT_SCOPE) diff --git a/plugins/pqm/CMakeLists.txt b/plugins/pqm/CMakeLists.txt index e406b58739..599c3725c7 100644 --- a/plugins/pqm/CMakeLists.txt +++ b/plugins/pqm/CMakeLists.txt @@ -75,8 +75,8 @@ target_link_libraries( ) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(INSTALLER_DESCRIPTION ${PLUGIN_DISPLAY_NAME}" "${PLUGIN_DESCRIPTION}) - configureinstallersettings(${PROJECT_NAME} ${INSTALLER_DESCRIPTION} "fixed") + set(INSTALLER_DESCRIPTION "${PLUGIN_DISPLAY_NAME} ${PLUGIN_DESCRIPTION}") + configureinstallersettings(${SCOPY_MODULE} ${INSTALLER_DESCRIPTION} "fixed") endif() set(PQM_TARGET_NAME ${PROJECT_NAME} PARENT_SCOPE) diff --git a/plugins/regmap/CMakeLists.txt b/plugins/regmap/CMakeLists.txt index f13ca845d9..27a87e91b1 100644 --- a/plugins/regmap/CMakeLists.txt +++ b/plugins/regmap/CMakeLists.txt @@ -113,7 +113,7 @@ target_link_libraries( ) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - configureinstallersettings(${PROJECT_NAME} ${PLUGIN_DESCRIPTION} "fixed") + configureinstallersettings(${SCOPY_MODULE} ${PLUGIN_DESCRIPTION} "fixed") endif() set(REGNMAP_TARGET_NAME ${PROJECT_NAME} PARENT_SCOPE) diff --git a/plugins/swiot/CMakeLists.txt b/plugins/swiot/CMakeLists.txt index 5b5f602252..737fb436dc 100644 --- a/plugins/swiot/CMakeLists.txt +++ b/plugins/swiot/CMakeLists.txt @@ -120,8 +120,8 @@ target_link_libraries( ) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(INSTALLER_DESCRIPTION ${PLUGIN_DISPLAY_NAME}" "${PLUGIN_DESCRIPTION}) - configureinstallersettings(${PROJECT_NAME} ${INSTALLER_DESCRIPTION} "fixed") + set(INSTALLER_DESCRIPTION "${PLUGIN_DISPLAY_NAME} ${PLUGIN_DESCRIPTION}") + configureinstallersettings(${SCOPY_MODULE} ${INSTALLER_DESCRIPTION} "fixed") endif() set(SWIOT_TARGET_NAME ${PROJECT_NAME} PARENT_SCOPE)