Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing nmos cpp with source code yields an error #434

Open
gl0522 opened this issue Feb 12, 2025 · 1 comment
Open

Installing nmos cpp with source code yields an error #434

gl0522 opened this issue Feb 12, 2025 · 1 comment

Comments

@gl0522
Copy link

gl0522 commented Feb 12, 2025

  1. When compiling the nmos cpp source code using cmake on Ubuntu 22.04 system, the following error occurs:

CMake Error: CMAKE_PROJECT_TOP_LEVEL_INCLUDES file does not exist: third_party/cmake/conan_provider.cmake
CMake Error at CMakeLists.txt:16 (enable_language):
Language 'CXX' is currently being enabled. Recursive call not allowed.

-- Configuring incomplete, errors occurred!
See also "/home/gule/nmos-cpp/Development/CMakeFiles/CMakeOutput.log".

2 The configuration of the cmake configuration file CMakeLists.txt is as follows:

# the injection point may be used to configure conan, but that requires CMake 3.24 or higher
# so avoid confusion and reject invocations which attempt to use it on lower versions
# see https://cmake.org/cmake/help/v3.24/variable/CMAKE_PROJECT_TOP_LEVEL_INCLUDES.html
# the alternative is to run conan install first instead
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/Development/cmake")

if(CMAKE_PROJECT_TOP_LEVEL_INCLUDES)
  cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
    else()
       cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
    endif()
    #cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
# project name
project(nmos-cpp)

enable_language(CXX)
# enable or disable the example applications
set(NMOS_CPP_BUILD_EXAMPLES ON CACHE BOOL "Build example applications")

# enable or disable the unit test suite
set(NMOS_CPP_BUILD_TESTS ON CACHE BOOL "Build test suite application")

# enable or disable the LLDP support library (lldp)
# and its additional dependencies
set(NMOS_CPP_BUILD_LLDP OFF CACHE BOOL "Build LLDP support library")
mark_as_advanced(FORCE NMOS_CPP_BUILD_LLDP)

# common config
include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppCommon.cmake)

# nmos-cpp dependencies
include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppDependencies.cmake)

# nmos-cpp libraries
include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppLibraries.cmake)

if(NMOS_CPP_BUILD_EXAMPLES)
    # nmos-cpp-node executable
    include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppNode.cmake)

    # nmos-cpp-registry executable
    include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppRegistry.cmake)
endif()

if(NMOS_CPP_BUILD_TESTS)
    # nmos-cpp-test executable
    include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppTest.cmake)
endif()

# export the config-file package
include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppExports.cmake)

Can you give me some advice?

@jonathan-r-thorpe
Copy link
Contributor

It seems that CMake is not finding the conan_provider.cmake file.

You could verify that it is in the file system; it should be found in the Development\third_party\cmake directory.

Then make sure that CMake is being run from the correct directory as per the Getting Started instructions:

cd <home-dir>/nmos-cpp/Development
mkdir build
cd build
cmake .. \
  -DCMAKE_BUILD_TYPE:STRING="<Debug-or-Release>" \
  -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES:STRING="third_party/cmake/conan_provider.cmake"
make

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants