Skip to content

Commit

Permalink
plugins/dmxusb: do not install static library on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Nov 5, 2023
1 parent a8ee488 commit 7e80758
Showing 1 changed file with 12 additions and 31 deletions.
43 changes: 12 additions & 31 deletions plugins/dmxusb/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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}
)

0 comments on commit 7e80758

Please sign in to comment.