diff options
author | Josh Blum | 2012-11-26 02:43:29 -0800 |
---|---|---|
committer | Josh Blum | 2012-11-26 02:43:29 -0800 |
commit | a10cd5cedee2eb30e49980f9136d6844ceb7ace1 (patch) | |
tree | ca5d14154c082b5772ce7ece57d767b5ab5a5918 /CMakeLists.txt | |
parent | 4aa91c001ed4dbcae1c517672b39581c9ffd7e23 (diff) | |
download | sandhi-a10cd5cedee2eb30e49980f9136d6844ceb7ace1.tar.gz sandhi-a10cd5cedee2eb30e49980f9136d6844ceb7ace1.tar.bz2 sandhi-a10cd5cedee2eb30e49980f9136d6844ceb7ace1.zip |
various tweaks for submodule building and msvc
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8982dbb..d87d214 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,10 +18,17 @@ endif() if(CMAKE_COMPILER_IS_GNUCXX) add_definitions(-Wall) + add_definitions(-Wextra) add_definitions(-fvisibility=hidden) add_definitions(-fvisibility-inlines-hidden) endif() +if(MSVC) + add_definitions(-D_WIN32_WINNT=0x0501) #minimum version required is windows xp + add_definitions(-DNOMINMAX) #disables stupidity and enables std::min and std::max + add_definitions(-DBOOST_ALL_DYN_LINK) #setup boost auto-linking in msvc +endif(MSVC) + ######################################################################## # Component names for install rules ######################################################################## @@ -123,31 +130,39 @@ set(CMAKE_BINARY_DIR ${GRAS_BINARY_DIR}/grextras) set(GRAS_FOUND TRUE) #GRAS_INCLUDE_DIRS, GRAS_LIBRARIES set above -set(VOLK_FOUND TRUE) +set(VOLK_FOUND ${ENABLE_VOLK}) set(VOLK_INCLUDE_DIRS ${GRAS_SOURCE_DIR}/gnuradio/volk/include ${GRAS_BINARY_DIR}/gnuradio/volk/include ) +if(MSVC) + #add compatibility includes for stdint types + list(APPEND VOLK_INCLUDE_DIRS ${GRAS_SOURCE_DIR}/gnuradio/volk/cmake/msvc) +endif() set(VOLK_LIBRARIES volk) -set(GNURADIO_CORE_FOUND TRUE) +set(GNURADIO_CORE_FOUND ${ENABLE_GR_CORE}) #GNURADIO_CORE_INCLUDE_DIRS set global by gnuradio set(GNURADIO_CORE_LIBRARIES gnuradio-core) -list(APPEND GR_TEST_PYTHON_DIRS - ${GRAS_SOURCE_DIR}/gnuradio/gnuradio-core/src/python - ${GRAS_BINARY_DIR}/gnuradio/gnuradio-core/src/lib/swig -) +if(ENABLE_GR_CORE) + list(APPEND GR_TEST_PYTHON_DIRS + ${GRAS_SOURCE_DIR}/gnuradio/gnuradio-core/src/python + ${GRAS_BINARY_DIR}/gnuradio/gnuradio-core/src/lib/swig + ) +endif(ENABLE_GR_CORE) #packet stuffs uses gr-digtal: -list(APPEND GR_TEST_PYTHON_DIRS - ${GRAS_BINARY_DIR}/gnuradio/gr-digital/python - ${GRAS_BINARY_DIR}/gnuradio/gr-digital/swig - ${GRAS_BINARY_DIR}/gnuradio/gr-filter/python - ${GRAS_BINARY_DIR}/gnuradio/gr-filter/swig - ${GRAS_BINARY_DIR}/gnuradio/gr-analog/python - ${GRAS_BINARY_DIR}/gnuradio/gr-analog/swig -) -list(APPEND GR_TEST_TARGET_DEPS gnuradio-digital gnuradio-filter gnuradio-fft gnuradio-analog) +if(ENABLE_GR_DIGITAL) + list(APPEND GR_TEST_PYTHON_DIRS + ${GRAS_BINARY_DIR}/gnuradio/gr-digital/python + ${GRAS_BINARY_DIR}/gnuradio/gr-digital/swig + ${GRAS_BINARY_DIR}/gnuradio/gr-filter/python + ${GRAS_BINARY_DIR}/gnuradio/gr-filter/swig + ${GRAS_BINARY_DIR}/gnuradio/gr-analog/python + ${GRAS_BINARY_DIR}/gnuradio/gr-analog/swig + ) + list(APPEND GR_TEST_TARGET_DEPS gnuradio-digital gnuradio-filter gnuradio-fft gnuradio-analog) +endif(ENABLE_GR_DIGITAL) add_subdirectory(grextras) |