@@ -43,11 +43,10 @@ list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules)
4343
4444# Set the version information here
4545set (VERSION_MAJOR 1)
46- set (VERSION_API 0)
47- set (VERSION_ABI 0)
48- set (VERSION_PATCH git )
46+ set (VERSION_API 0)
47+ set (VERSION_ABI 0)
48+ set (VERSION_PATCH 0 )
4949
50- set (PYTHON3_MIN_VERSION "3.6.5" )
5150cmake_policy (SET CMP0011 NEW)
5251
5352# Enable generation of compile_commands.json for code completion engines
@@ -63,13 +62,12 @@ if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
6362 add_definitions (-fvisibility=hidden)
6463endif ()
6564
66-
6765IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
68- SET (CMAKE_CXX_STANDARD 11 )
66+ SET (CMAKE_CXX_STANDARD 14 )
6967ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
70- SET (CMAKE_CXX_STANDARD 11 )
68+ SET (CMAKE_CXX_STANDARD 14 )
7169ELSEIF (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
72- SET (CMAKE_CXX_STANDARD 11 )
70+ SET (CMAKE_CXX_STANDARD 14 )
7371ELSE ()
7472 message (WARNING "C++ standard could not be set because compiler is not GNU, Clang or MSVC." )
7573ENDIF ()
@@ -87,6 +85,7 @@ ENDIF()
8785########################################################################
8886# Install directories
8987########################################################################
88+ include (FindPkgConfig)
9089find_package (Gnuradio "3.9" REQUIRED runtime fft)
9190include (GrVersion)
9291
@@ -127,8 +126,6 @@ endif(APPLE)
127126# Find gnuradio build dependencies
128127########################################################################
129128find_package (Doxygen)
130- find_package (PythonInterp ${PYTHON_MIN_VERSION} COMPONENTS Interpreter Development NumPy)
131-
132129
133130########################################################################
134131# Check if boheh module exists
@@ -139,6 +136,18 @@ if(NOT BOKEH_FOUND)
139136 message (FATAL_ERROR "Bokeh library required to compile gr-bokehgui" )
140137endif ()
141138
139+ ########################################################################
140+ # PyBind11 Related
141+ ########################################################################
142+
143+ find_package (pybind11 REQUIRED)
144+ execute_process (
145+ COMMAND "${PYTHON_EXECUTABLE} " -c
146+ "try:\n import numpy\n import os\n inc_path = numpy.get_include()\n if os.path.exists(os.path.join(inc_path, 'numpy', 'arrayobject.h')):\n print(inc_path, end='')\n except:\n pass"
147+ OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR)
148+ # format path in CMake-style for consistency with other path variables
149+ # (a consistent style helps conda builds by using the same path separators)
150+ file (TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR} " PYTHON_NUMPY_INCLUDE_DIR)
142151
143152########################################################################
144153# Setup doxygen option
@@ -149,7 +158,6 @@ else(DOXYGEN_FOUND)
149158 option (ENABLE_DOXYGEN "Build docs using Doxygen" OFF )
150159endif (DOXYGEN_FOUND)
151160
152-
153161########################################################################
154162# Create uninstall target
155163########################################################################
@@ -162,17 +170,21 @@ add_custom_target(uninstall
162170 ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR} /cmake_uninstall.cmake
163171 )
164172
165-
166173########################################################################
167174# Add subdirectories
168175########################################################################
169176add_subdirectory (include /bokehgui)
170177add_subdirectory (lib)
171178add_subdirectory (apps)
172179add_subdirectory (docs)
173- add_subdirectory (swig)
174- add_subdirectory (python)
175- add_subdirectory (grc)
180+ # NOTE: manually update below to use GRC to generate C++ flowgraphs w/o python
181+ if (ENABLE_PYTHON)
182+ message (STATUS "PYTHON and GRC components are enabled" )
183+ add_subdirectory (python)
184+ add_subdirectory (grc)
185+ else (ENABLE_PYTHON)
186+ message (STATUS "PYTHON and GRC components are disabled" )
187+ endif (ENABLE_PYTHON)
176188
177189########################################################################
178190# Install cmake search helper for this library
0 commit comments