1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 23:55:13 -05:00

Adaptation of cmake files to MSVC

This commit is contained in:
f4exb 2018-12-02 03:06:04 +01:00
parent f520ad6072
commit 4a69a7d39f
20 changed files with 46 additions and 10 deletions

View File

@ -211,7 +211,11 @@ else()
message(STATUS "Compiling with SIMD instructions for DSP if available")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wvla -Woverloaded-virtual -ffast-math -ftree-vectorize ${EXTRA_FLAGS}")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wvla -Woverloaded-virtual -ffast-math -ftree-vectorize ${EXTRA_FLAGS}")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W3 -MP ${EXTRA_FLAGS}")
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (BUILD_DEBIAN)

View File

@ -35,6 +35,8 @@ add_library(bladerf1device SHARED
${bladerf1device_SOURCES}
)
set_target_properties(bladerf1device PROPERTIES DEFINE_SYMBOL "devices_EXPORTS")
if (BUILD_DEBIAN)
target_link_libraries(bladerf1device
bladerf

View File

@ -32,6 +32,8 @@ add_library(bladerf2device SHARED
${bladerf2device_SOURCES}
)
set_target_properties(bladerf2device PROPERTIES DEFINE_SYMBOL "devices_EXPORTS")
if (BUILD_DEBIAN)
target_link_libraries(bladerf2device
bladerf

View File

@ -34,6 +34,8 @@ add_library(hackrfdevice SHARED
${hackrfdevice_SOURCES}
)
set_target_properties(hackrfdevice PROPERTIES DEFINE_SYMBOL "devices_EXPORTS")
if (BUILD_DEBIAN)
target_link_libraries(hackrfdevice
hackrf

View File

@ -41,6 +41,8 @@ add_library(limesdrdevice SHARED
${limesdrdevice_SOURCES}
)
set_target_properties(limesdrdevice PROPERTIES DEFINE_SYMBOL "devices_EXPORTS")
if (BUILD_DEBIAN)
target_link_libraries(limesdrdevice
limesuite

View File

@ -33,6 +33,8 @@ add_library(perseusdevice SHARED
${perseusdevice_SOURCES}
)
set_target_properties(perseusdevice PROPERTIES DEFINE_SYMBOL "devices_EXPORTS")
if (BUILD_DEBIAN)
target_link_libraries(perseusdevice
perseus

View File

@ -39,6 +39,8 @@ add_library(plutosdrdevice SHARED
${plutosdrdevice_SOURCES}
)
set_target_properties(plutosdrdevice PROPERTIES DEFINE_SYMBOL "devices_EXPORTS")
if (BUILD_DEBIAN)
target_link_libraries(plutosdrdevice
iio

View File

@ -38,6 +38,8 @@ add_library(soapysdrdevice SHARED
${soapysdrdevice_SOURCES}
)
set_target_properties(soapysdrdevice PROPERTIES DEFINE_SYMBOL "devices_EXPORTS")
if (BUILD_DEBIAN)
target_link_libraries(soapysdrdevice
SoapySDR

View File

@ -48,6 +48,8 @@ add_library(httpserver SHARED
${httpserver_HEADERS_MOC}
)
set_target_properties(httpserver PROPERTIES DEFINE_SYMBOL "httpserver_EXPORTS")
target_link_libraries(httpserver
${QT_LIBRARIES}
)

View File

@ -34,6 +34,8 @@ add_library(logging SHARED
${logging_HEADERS_MOC}
)
set_target_properties(logging PROPERTIES DEFINE_SYMBOL "logging_EXPORTS")
target_link_libraries(logging
${QT_LIBRARIES}
)

View File

@ -23,6 +23,7 @@ set(chanalyzer_FORMS
include_directories(
.
${CMAKE_CURRENT_BINARY_DIR}
${Boost_INCLUDE_DIRS}
)
#include(${QT_USE_FILE})

View File

@ -23,6 +23,7 @@ set(atv_FORMS
include_directories(
.
${CMAKE_CURRENT_BINARY_DIR}
${Boost_INCLUDE_DIRS}
)
#include(${QT_USE_FILE})

View File

@ -36,6 +36,7 @@ include_directories(
.
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${Boost_INCLUDE_DIRS}
)
#include(${QT_USE_FILE})

View File

@ -88,6 +88,8 @@ add_library(qrtplib SHARED
${qrtplib_HEADERS_MOC}
)
set_target_properties(qrtplib PROPERTIES DEFINE_SYMBOL "qrtplib_EXPORTS")
target_link_libraries(qrtplib
${QT_LIBRARIES}
)

View File

@ -289,6 +289,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/httpserver
${CMAKE_SOURCE_DIR}/qrtplib
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${Boost_INCLUDE_DIRS}
)
target_link_libraries(sdrbase

View File

@ -295,7 +295,7 @@ void DownChannelizer::freeFilterChain()
void DownChannelizer::debugFilterChain()
{
qDebug("DownChannelizer::debugFilterChain: %u stages", m_filterStages.size());
qDebug("DownChannelizer::debugFilterChain: %lu stages", m_filterStages.size());
for(FilterStages::iterator it = m_filterStages.begin(); it != m_filterStages.end(); ++it)
{

View File

@ -16,7 +16,7 @@ set(sdrgui_SOURCES
gui/commanditem.cpp
gui/commandkeyreceiver.cpp
gui/commandoutputdialog.cpp
gui/comboboxnoarrow.cpp
# gui/comboboxnoarrow.cpp
gui/crightclickenabler.cpp
gui/cwkeyergui.cpp
gui/editcommanddialog.cpp
@ -25,7 +25,7 @@ set(sdrgui_SOURCES
gui/glscope.cpp
gui/glscopemulti.cpp
gui/glscopegui.cpp
gui/glscopemultigui.cpp
# gui/glscopemultigui.cpp
gui/glshadersimple.cpp
gui/glshadertextured.cpp
gui/glshadertvarray.cpp
@ -49,7 +49,7 @@ set(sdrgui_SOURCES
gui/valuedialz.cpp
dsp/scopevis.cpp
dsp/scopevismulti.cpp
# dsp/scopevismulti.cpp
dsp/scopevisxy.cpp
dsp/spectrumvis.cpp
dsp/spectrumscopecombovis.cpp
@ -82,7 +82,7 @@ set(sdrgui_HEADERS
gui/commanditem.h
gui/commandkeyreceiver.h
gui/commandoutputdialog.h
gui/comboboxnoarrow.h
# gui/comboboxnoarrow.h
gui/crightclickenabler.h
gui/cwkeyergui.h
gui/editcommanddialog.h
@ -91,7 +91,7 @@ set(sdrgui_HEADERS
gui/glscope.h
gui/glscopemulti.h
gui/glscopegui.h
gui/glscopemultigui.h
# gui/glscopemultigui.h
gui/glshadersimple.h
gui/glshadertvarray.h
gui/glshadertextured.h
@ -116,7 +116,7 @@ set(sdrgui_HEADERS
gui/valuedialz.h
dsp/scopevis.h
dsp/scopevismulti.h
# dsp/scopevismulti.h
dsp/scopevisxy.h
dsp/spectrumvis.h
dsp/spectrumscopecombovis.h
@ -198,6 +198,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${CMAKE_CURRENT_BINARY_DIR}
${OPENGL_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
)
target_link_libraries(sdrgui

View File

@ -35,6 +35,9 @@
#include "util/messagequeue.h"
#include "util/doublebuffer.h"
#undef M_PI
#define M_PI 3.14159265358979323846
class GLScopeMulti;
class SDRGUI_API ScopeVisMulti : public QObject {

View File

@ -22,6 +22,8 @@ add_library(serialdv SHARED
${serialdv_SOURCES}
)
set_target_properties(serialdv PROPERTIES DEFINE_SYMBOL "serialdv_EXPORTS")
target_link_libraries(serialdv
${LIBUSB_LIBRARIES}
)

View File

@ -25,13 +25,15 @@ include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
)
set_target_properties(swagger PROPERTIES COMPILE_FLAGS "-Wno-conversion-null -Wno-unused-variable -Wno-unused-parameter")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set_target_properties(swagger PROPERTIES COMPILE_FLAGS "-Wno-conversion-null -Wno-unused-variable -Wno-unused-parameter")
endif()
target_link_libraries(swagger
${QT_LIBRARIES}
)
set_target_properties(swagger PROPERTIES DEFINE_SYMBOL "sdrangel_EXPORTS")
set_target_properties(swagger PROPERTIES DEFINE_SYMBOL "swagger_EXPORTS")
target_link_libraries(swagger Qt5::Core Qt5::Network)