summaryrefslogtreecommitdiff
path: root/gr-dtv
diff options
context:
space:
mode:
authorgnieboer <gnieboer@corpcomm.net>2016-02-07 00:03:00 +0300
committerJohnathan Corgan <johnathan@corganlabs.com>2016-05-30 13:21:13 -0700
commitae26f969c9c260556aad4ffd006fea96f3452d01 (patch)
treedf147aeb0b90dc60b1680d13942ea096c3bc1f63 /gr-dtv
parent97059450f485bb1bf74f5dc2b2bf8b1852a0a7bf (diff)
MSVC-specific changes for compatibility
* Changed gr-dtv cmake so SSE2 would be detected on both MSVC and GCC compilers * Removed addition of /O2 flag on MSVC builds as it conflicts with /RTC1 flag * Added detection of MSVC 14.0 and added additional filenames to library detection to cover what windows builds the dependencies as. * Additional name options were placed at end so as to not conflict with other builds. * Removed use of not() function and replaced with standard C syntax. The check for zero is to handle the edge case where the random numbers return zero and would cause a div/zero error two lines afterwards. * Add dwrite library for win32 builds for qtgui
Diffstat (limited to 'gr-dtv')
-rw-r--r--gr-dtv/lib/CMakeLists.txt19
1 files changed, 17 insertions, 2 deletions
diff --git a/gr-dtv/lib/CMakeLists.txt b/gr-dtv/lib/CMakeLists.txt
index 868205c241..fc78cccf9e 100644
--- a/gr-dtv/lib/CMakeLists.txt
+++ b/gr-dtv/lib/CMakeLists.txt
@@ -128,10 +128,25 @@ list(APPEND dtv_libs
)
include (CheckCCompilerFlag)
-CHECK_C_COMPILER_FLAG ("-msse2" SSE2_SUPPORTED)
+if (MSVC)
+ # 64-bit MSVC always supports SSE2
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(SSE2_SUPPORTED true)
+ else ()
+ CHECK_C_COMPILER_FLAG ("/arch:SSE2" SSE2_SUPPORTED)
+ endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
+else ()
+ CHECK_C_COMPILER_FLAG ("-msse2" SSE2_SUPPORTED)
+endif(MSVC)
if(SSE2_SUPPORTED)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
+ if (NOT MSVC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2")
+ else ()
+ if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")
+ endif ()
+ endif ()
ADD_DEFINITIONS(-DDTV_SSE2)
endif(SSE2_SUPPORTED)