Category : conan

Im trying build freeGLUT project with cmake and conan for MS Visual Studio, but when I build it return link error LNK1104 "Cant open file "freeglut.lib" for Release and "Cant open file "freeglutd.lib" for Debug. Visual Studio 16 2019 Cmake 3.20.3 Conan 1.39.0 Project Tree CMakeLists.txt cmake_minimum_required(VERSION 3.20) project(OpenGLConan) include(${CMAKE_BINARY_DIR}/conan_paths.cmake) add_subdirectory(src) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) ..

Read more

I’m trying to use gtest (1.11.0) with conan, the test part of my CMakeFiles is like that: # […] include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() # […] # https://github.com/google/googletest/blob/master/googletest/README.md include(FetchContent) FetchContent_Declare( googletest URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip ) set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(googletest) enable_testing() add_executable(MyProjectName test.cpp) target_link_libraries(MyProjectName ${CONAN_LIBS}) add_test(NAME test COMMAND test) And my test file is like that: #include ..

Read more

Below conan cmd failed with invalid syntax, but that file is not created by me. Not sure why below error is appearing. $ conan inspect poco/1.9.4 poco/1.9.4: Not found in local cache, looking in remotes… poco/1.9.4: Trying with ‘conancenter’… Downloading conanmanifest.txt completed [0.74k] Downloading conanfile.py completed [14.36k] Downloading conan_export.tgz completed [0.30k] Decompressing conan_export.tgz completed [0.00k] ..

Read more

When I use conan create -e VAR=A . demo/testing to set a env. variable VAR=A, how can I access the set environment variable inside the conanfile.py. The variable VAR is not inside os.environ dictionary. I cannot use export VAR=A. import os import sys from conans import ConanFile class BaseLibrary(ConanFile): name = "base-library" def set_version(self): print(os.environ) ..

Read more

I am working on a C++ web framework, oatpp to create REST APIs. Using the oatpp-starter project where the CMakeLists.txt looks like: cmake_minimum_required(VERSION 3.1) set(project_name my-project) ## rename your project here project(${project_name}) set(CMAKE_CXX_STANDARD 11) add_library(${project_name}-lib src/AppComponent.hpp src/controller/MyController.cpp src/controller/MyController.hpp src/dto/DTOs.hpp ) ## link libs find_package(oatpp 1.2.5 REQUIRED) target_link_libraries(${project_name}-lib PUBLIC oatpp::oatpp PUBLIC oatpp::oatpp-test ) target_include_directories(${project_name}-lib PUBLIC src) ..

Read more

I am want to package a CMake project with conan. For that I use the following conanfile.py: import os from conans import ConanFile, tools from conan.tools.cmake import CMake, CMakeToolchain from conans.tools import Version class BaseLibrary(ConanFile): name = "base-library" version = "1.0.0" description = """This is a test project with a library base::io and base::math and ..

Read more

Good day, I have the following python conanfile.py: from conans import ConanFile class GeneticAlgorithmProject(ConanFile): # Note: options are copied from CMake boolean options. # When turned off, CMake sometimes passes them as empty strings. # "some_option_name": ["ON", "OFF", ""] options = { } name = "GeneticAlgorithmProject" version = "0.1" requires = ( "fmt/8.0.1", "effolkronium-random/1.4.0", "range-v3/0.11.0" ..

Read more

I’m using Conan as my package manager. My CMakeLists.txt looks like this: cmake_minimum_required(VERSION 3.20) project(opencv-test) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS true) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(NO_OUTPUT_DIRS) add_executable( ${PROJECT_NAME} main.cpp ) target_include_directories( ${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR} ${CONAN_INCLUDE_DIRS_OPENCV} ) target_link_libraries( ${PROJECT_NAME} PRIVATE ${CONAN_LIBS_OPENCV} ) When I try to build it, I get a lot of linking errors on both Windows and ..

Read more

I would like to try some libc++ new features with project built by gcc. Now I already knew how to import libc++ for g++. Obviously, it requires libcxxabi headers and libcxxlibcxxabi library. My question is how to import those files properly? There are several ways to make it: apt install libc++-dev and libc++abi-dev, those apt ..

Read more