diff --git a/CMakeLists.txt b/CMakeLists.txt index bb6be63317..b64055fa2a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -779,12 +779,6 @@ set( INC_AFTER find_package( SWIG 3.0 REQUIRED ) include( ${SWIG_USE_FILE} ) -# pybind11 is header-only, so include the subdir -add_subdirectory(thirdparty/pybind11) - -# Make sure that we get our pybind11 and not the system pybind11 (ours is patched to work with wx) -include_directories( BEFORE SYSTEM ${PYBIND11_INCLUDE_DIR} ) - set( PythonInterp_FIND_VERSION 3.6 ) set( PythonLibs_FIND_VERSION 3.6 ) @@ -826,6 +820,12 @@ message( STATUS "Python module install path: ${PYTHON_DEST}" ) find_package( PythonLibs 3.6 REQUIRED ) +# pybind11 is header-only, so include the subdir +add_subdirectory(thirdparty/pybind11) + +# Make sure that we get our pybind11 and not the system pybind11 (ours is patched to work with wx) +include_directories( BEFORE SYSTEM ${PYBIND11_INCLUDE_DIR} ) + # Infrequently needed headers go at end of search paths, append to INC_AFTER which # although is used for all components, should be a harmless hit for something like eeschema # so long as unused search paths are at the end like this.