From 7e807580da17669060dc4becbdd63c9633983d32 Mon Sep 17 00:00:00 2001 From: Massimo Callegari Date: Sun, 5 Nov 2023 11:29:22 +0100 Subject: [PATCH] plugins/dmxusb: do not install static library on Windows --- plugins/dmxusb/src/CMakeLists.txt | 43 +++++++++---------------------- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/plugins/dmxusb/src/CMakeLists.txt b/plugins/dmxusb/src/CMakeLists.txt index 9a09e61ae5..6276130ee6 100644 --- a/plugins/dmxusb/src/CMakeLists.txt +++ b/plugins/dmxusb/src/CMakeLists.txt @@ -27,13 +27,10 @@ add_library(${module_name} ) if(WIN32) - set(FTD2XXDIR "C:/Qt/D2XXSDK") - target_link_libraries(${module_name} PRIVATE - ${FTD2XXDIR}/i386/libftd2xx.a - ) - target_include_directories(${module_name} PRIVATE - ${FTD2XXDIR} - ) + set(FTD2XXDIR "C:/projects/D2XXSDK") + target_link_libraries(${module_name} PRIVATE ${FTD2XXDIR}/i386/libftd2xx.a) + target_include_directories(${module_name} PRIVATE ${FTD2XXDIR}) + message("Building with FTD2xx support.") set(WITH_D2XX TRUE) endif() @@ -121,11 +118,6 @@ target_link_libraries(${module_name} PRIVATE Qt${QT_MAJOR_VERSION}::Widgets ) -if(WIN32) - target_compile_definitions(${module_name} PRIVATE FTD2XX) - message("Building with FTD2xx support.") -endif() - if(UNIX) target_sources(${module_name} PUBLIC euroliteusbdmxpro.cpp euroliteusbdmxpro.h @@ -155,29 +147,17 @@ target_link_libraries(${module_name} PRIVATE ) if(WITH_D2XX) - target_sources(${module_name} PUBLIC - ftd2xx-interface.cpp ftd2xx-interface.h - ) - - target_compile_definitions(${module_name} PRIVATE - FTD2XX - ) + target_sources(${module_name} PUBLIC ftd2xx-interface.cpp ftd2xx-interface.h) + target_compile_definitions(${module_name} PRIVATE FTD2XX) endif() if((WITH_D2XX) AND (WIN32)) - target_include_directories(${module_name} PRIVATE - ${FTD2XXDIR} - ) - - target_link_libraries(${module_name} PRIVATE - ${FTD2XXDIR}/i386/libftd2xx.a - ) + target_include_directories(${module_name} PRIVATE ${FTD2XXDIR}) + target_link_libraries(${module_name} PRIVATE ${FTD2XXDIR}/i386/libftd2xx.a) endif() if(WITH_LIBFTDI) - target_sources(${module_name} PUBLIC - libftdi-interface.cpp libftdi-interface.h - ) + target_sources(${module_name} PUBLIC libftdi-interface.cpp libftdi-interface.h) endif() if (UNIX AND NOT APPLE) @@ -189,5 +169,6 @@ if (UNIX AND NOT APPLE) endif() install(TARGETS ${module_name} - DESTINATION ${INSTALLROOT}/${PLUGINDIR} -) + LIBRARY DESTINATION ${INSTALLROOT}/${PLUGINDIR} + RUNTIME DESTINATION ${INSTALLROOT}/${PLUGINDIR} +) \ No newline at end of file