Skip to content

Commit

Permalink
generic:fixup
Browse files Browse the repository at this point in the history
Signed-off-by: Ionut Muthi <[email protected]>
  • Loading branch information
IonutMuthi committed Jun 6, 2024
1 parent 2b5283b commit 1eec60b
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 14 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions cmake/Modules/ScopyWindows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions plugins/adc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions plugins/datalogger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions plugins/debugger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions plugins/m2k/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions plugins/pqm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion plugins/regmap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions plugins/swiot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 1eec60b

Please sign in to comment.