191 questions
0
votes
0
answers
37
views
Native Android: How to get an AAsetManager object without a NativeActivity
I want to write a native android library that can access shader and texture files from
the res/raw folder of my application (or rather res/assets?) without being dependent of a specific activity ...
1
vote
1
answer
794
views
CMake : error while loading shared libraries: libwhisper.so.1: cannot open shared object file: No such file or directory
I installed whisper in MyPrj :
~/Downloads/whisper.cpp$ cmake --install builddir/ --prefix=/home/me/MyPrj/src/whisperLib
-- Install configuration: "Release"
-- Installing: /home/me/MyPrj/src/...
2
votes
1
answer
98
views
Building OpenCV into Static Library results in missing functions
I am building my c/c++ static library for either my ios or android. Before I built the dynamic library using the keyword SHARED and everything worked fine. I crosscompiled openCV for both versions (...
1
vote
1
answer
137
views
CMake and CUnit under windows cygwin
I cross compile software for embedded using cmake under cygwin. Now I would like to compile all CUnit test plans and using CTest on widows.
Doing so I'm calling find_package(CUnit REQUIRED) in my ...
1
vote
0
answers
1k
views
CXX1429: error when building with cmake using app\src\main\cpp\CMakeLists.txt: C++ build system [prefab] failed while executing
I was trying to build android vulkan app from this guide
Whenever I try to build, execution error occurred in
"app\build\intermediates\cxx\Debug\1k4v2e55\logs\arm64-v8a\prefab_command.bat" ...
0
votes
2
answers
76
views
Specify different CMAKE_CXX_STANDARD for unit tests [duplicate]
I have a program that requires in its top-level CMakeLists.txt:
set(CMAKE_CXX_STANDARD 11)
This cannot be touched. I introduced unit tests to this project using the catch2 framework, and created an ...
0
votes
0
answers
270
views
How to set up CMakeLists.txt for Libtorch in a C++ Project?
I have a simple project with use of libtorch. The structure of the project is the following:
MyLibtorchProject/
├── CMakeLists.txt
├── main.cpp
├── libtorch/
└── build/
The content of CMakeLists.txt ...
0
votes
1
answer
147
views
How to Enable Breakpoints and Debugging in Flutter Windows Release Build?
I'm developing a Flutter application on Windows, and everything works perfectly in debug mode. However, when I switch to release mode, I encounter multiple issues, particularly with the UI rendering ...
1
vote
0
answers
226
views
How to fetchcontent_declare() properly and also target link these libraries?
I am trying to get some libraries with FetchContent_Declare(), however I dont know if my library names in the target_link_libraries() method are right (How can I know it) and also why I am getting ...
0
votes
0
answers
316
views
unrecognized argument to ‘-flto=’ option
I am trying to install a simulation on my Linux Mint machine. Last step of the process was simply typing make in the terminal and the process would complete. But when I did that I recived an error ...
0
votes
0
answers
111
views
CMake Cannot Find SDL2TTF package
I installed SDL2ttf for a project and SDL2_image and it seems that cmake cannot find the package only of SDL2ttf although i applied the same logic. Specifically i downloaded the libraries, i created a ...
0
votes
2
answers
104
views
Avoid ifdef in my project for multiple hardware
I have a project written in C on STM32 platform. My project source code will be available for multiple hardware. I use CMakeLists
For example I have 2 header for the moment hardware1.h and hardware2....
0
votes
1
answer
535
views
CMake : get_target_property called on non-existent target "xyz"
This is a C/C++ project. I want to exclude a particular compilation target (say "xyz") from my setup. There are macros already in place for that (say, XYZ), which I have successfully set to ...
0
votes
1
answer
265
views
How to include cxxopts.hpp in clion
I'm not fluent in C++/cmake and I'm trying to figure out how to use conan package management in Jetbrains CLion. I was able to get a json library working but while I can manage to install cxxopts, ...
1
vote
0
answers
67
views
cmake linking libraries in sibling directories problem
I am using cmake for c++. The sample project I am working on looks like this:
.
├── CMakeLists.txt
├── Lv1b
│ ├── CMakeLists.txt
│ ├── b.cpp
│ └── b.h
├── Lv1c
│ ├── CMakeLists.txt
│ └── ...
0
votes
1
answer
77
views
QT creator can't seem to find the module plugin for a separate directory
I'm relatively new to QT and I've been struggling with keeping the files I use for creating my project organized.
Currently I'm trying to store the backend c++ files of my project into a separate ...
0
votes
0
answers
47
views
Can I use CMake to build 2 libraries with a difference based on a generated config file containing a variable
I'm trying to generate to shared libraries with the difference between them is a slight variation in code
, what I had in mind is define a variable using a cmake generated header called ENGINE_TYPE ...
0
votes
1
answer
130
views
Problems while trying to compile a program with cmake
We have a program named: xyano_prorate.c
This code We need to run through it with Sonarcube to identify potential coding errors, because after migration it is showing segmentation error in the core ...
0
votes
1
answer
272
views
How to correctly link modules in cpp using CMake
I'm starting to learn C++ and CMake is a bigger struggle for me.
I've written a little code to get me started and also wanted to write tests from the very beginning.
Except that I get Undefined ...
0
votes
0
answers
456
views
CMake Error: G++ broken when using aarch64-none-elf toolchain for cross compiling TensorFlow Lite C API
I would like to cross-compile the tensorflow lite C API with my arm GNU toolchain. I have thus created a Cmake toolchain file. However I am getting this error:
Anyone knows where the issue lies?
`
-- ...
1
vote
0
answers
695
views
Cmake error : Configuring incomplete, errors occurred
I was trying to build docker image using command docker-compose -f caMicroscope.yml build and I am getting the following error:
CMake Error at build/orthanc/OrthancFramework/Resources/CMake/...
1
vote
0
answers
166
views
How to prevent CMake rerun after CMakeLists.txt changed?
I am working on a project in Mercurial with CMake in Windows Visual Studio 2022.
CMake reruns every time I switch from one revision to another, which changes CMakeLists.txt, and a very time costly ...
0
votes
1
answer
2k
views
How to run specific tests in CMake project with GoogleTest?
Project Overview:
I'm currently working on a C++ project that includes multiple things I'd like to test, and I'm using GoogleTest for unit testing. My project structure looks something like this:
...
-2
votes
1
answer
6k
views
CMake's CMakeLists.txt cant find Visual Studio 17 2022
[image of my CMake showing the error:CMake Error at CMakeLists.txt:3 (project):
Generator
Visual Studio 17 2022
could not find any instance of Visual Studio.
](https://i.sstatic.net/kZH0j.png)
Even ...
0
votes
1
answer
1k
views
CMake build errors when trying to fetch GoogleTest for C++ project
As a personal project I have been trying to create my own C++ library, and I have been using Googles GoogleTest for unit tests. To give you a good idea of how my project is structured here is my file ...
1
vote
1
answer
342
views
How to correctly define CMakeLists.txt for Tesseract?
I want to compile and build with CMake this simple tesseract C++ code:
// https://tesseract-ocr.github.io/tessdoc/Examples_C++.html
#include <tesseract/baseapi.h>
#include <leptonica/...
0
votes
1
answer
135
views
Time string manipulation in CMakeLists.txt
I want to automatically set an expiration date for two months from now in CMakeLists.txt. Is there an easy way to find that date (in whatever format) in CMakeLists.txt? I found the TIMESTAMP method ...
0
votes
0
answers
121
views
CMake function ```find_package()``` does not find config.cmake configuration files
I installed the fCWT external library following the instructions from the official repository: https://github.com/fastlib/fCWT
And in the Ubuntu default path /usr/local/share/fcwt/cmake the ...
1
vote
1
answer
302
views
Is there a rule to know which CMake variables are settable with -D?
I'm learning CMake and am trying to get my head around the settable variables.
I've heard CMake described as a stateful class, whose "member variables" you manipulate using the various ...
1
vote
0
answers
79
views
CCACHE is returning wrong result
I am using the Synopsis ARC compiler for a multi-core (two cores) application, and I have a startup.s file written in assembly. To distinguish the behavior for the application on different cores, I ...
0
votes
0
answers
173
views
cannot find -llegacy_stdio_definitions: No such file or directory
I've been working on a school project in c++ using SFML on macOS, since it's my main OS. I ran into an issue with threads (a requirement of the project :/) and decided to switch to windows, since the ...
3
votes
0
answers
40
views
CMake: target_sources() warning CMP0076 [duplicate]
I have an INTERFACE called exi and I want its INTERFACE_SOURCES to be with the source code directory during build then later during install I would copy the source files elsewhere and set ...
0
votes
0
answers
124
views
How to use vtk in Cutsom C++ Project using CLion/CMake and Win10
somehow I can’t get vtk to properly run in my project.
I have downloaded, build and installed vtk-9.3 on my local machine.
I can also find the VTK Packages and it’s modules, as well as reference the ...
3
votes
3
answers
4k
views
Facing this error while trying to run react-native application on android emulator->ninja: error: manifest 'build.ninja' still dirty after 100 tries
dependencies with version used in myProject are :
gradle : 8.0.1
"react-native-reanimated": "^3.4.1", // I think this is causing the issue
Task :react-native-reanimated:...
1
vote
1
answer
1k
views
CMake not including Vulkan header when building Walnut
I'm trying to build this project:
https://github.com/Mr-Precise/Walnut-cmake
I'm using Unix Makefiles as a generator and MinGW
This is the error im getting after using make:
D:/Projekty/C++/Walnut-...
0
votes
0
answers
211
views
during "${CMAKE_BUILD_PARALLEL_LEVEL} / 2 + 1" cmake throws "syntax error, unexpected exp_DIVIDE(2)"
in cmake version 3.27.7
I would like to set number of jobs (for -j) to jobs = jobs//2 + 1 in CMakeLists.txt with line
math(EXPR CMAKE_BUILD_PARALLEL_LEVEL "${CMAKE_BUILD_PARALLEL_LEVEL} / 2 + 1&...
0
votes
1
answer
343
views
Launch two projects with VSCode Cmake that are in the same Cmake file
I have two different projects in my CMakeLists.txt file.
I'm using a configuration like this in my launch.json file inside the `.vscode' folder:
{
"name": "Launch main project",
...
0
votes
0
answers
40
views
Handeling pthread Macro Error at Build Time?
I have been encountering same error for a large period of time now. C++ example below is simplified, as my first encounter with this error was while I was building a newly downloaded library. I don't ...
0
votes
0
answers
98
views
How does cmake handle duplicate build options
My repo has a bit messy CMAKEList which configures many compile options.
If I enable -Og but the legacy later also defines -O3, which option are chosen effective?
Is it
First one appears
Last one ...
0
votes
2
answers
145
views
How to add cmake options on Windows? [duplicate]
I need to build a library for Linux and Windows with options FIRST_OPTION=1 and SECOND_OPTION=1.
For Linux I just use:
make FIRST_OPTION=1 SECOND_OPTION=1
And everything works OK
For Windows I use ...
0
votes
0
answers
99
views
How to inherit paths from CMakeLists in parent directories?
I have two projects PROJ in my workspace ws with corresponding third party libraries TPL as shown below. All depend on opencv 4.4.
ws
├── PROJ1 (opencv 4.4)
| └── TPL1 (opencv 4.4)
└── PROJ2 (...
1
vote
1
answer
75
views
How to make/build project against one version of a library but its dependencies against a different version of that library?
I have workspace structure as shown below. It involves PROJ for project, TPL for third party library and DEP-PROJ for dependency project (and ws for workspace). I have also specified their ...
0
votes
0
answers
848
views
How to access files in recipe-sysroot-native
I have an executable in recipe-sysroot-native of my recipe which I intend to use in my CMake for a custom command.
.../xxx-package/git-r0/recipe-sysroot-native/usr/bin/wayland-scanner
What path should ...
0
votes
1
answer
264
views
Update the list defined in a top-level CMakeLists.txt in a .cmake function called from sub directory CMakeLists.txt file
I am trying to use a .cmake file to update a global list to collect all the library names and use that list to link all the libraries from the top-level CMakeLists.txt file but unfortunately at the ...
1
vote
0
answers
1k
views
get_target_property() called with non-existent target "opencv_world"
I'm pretty new to using CMake to build/compile OpenCV projects in Visual Studio Code.
From my understanding so far, this is the 'typical' CMake file 'format' if I want to compile a OpenCV project
...
1
vote
2
answers
146
views
How to convert a cmake header file with comments into a TSV/CSV file?
I have a number of cmake header files from which I would like to extract the comments and the cmakedefine, into a CSV (or TSV) file.
The typical input looks like this:
/**
* 1st Multi-line brief ...
0
votes
1
answer
693
views
CMake build linking failure (mysql-connector-cpp)
I am trying to build my application using CMake on Windows. I use 3 3rd party lib: Nlohmann Json and Curl which I linked via Vcpkg and mysql-connector-cpp for which I used the msi installer.
This is ...
0
votes
0
answers
40
views
Arguments ignored when using add_custom_command
I am USing cmake 3.14, and part of the script it's calling another python script and giving it the build path as an argument but the python doesn't receive this argument
set(arg ${CMAKE_BINARY_DIR}) ...
0
votes
0
answers
52
views
Where is OpenCV CMake option ANDROID set?
I'm trying to build a modified OpenCV (4.8.0) from sources for Android on a Windows machine.
To configure CMake right I'm looking at the opencv/CMakeLists.txt as mentioned in the docs here.
As I'm not ...
0
votes
1
answer
165
views
G++ Parameters to Cmakelist
I am trying to build my Project using cmake. With 3rd Party headerfiles and libarys. The headers are in /usr/local/include/ and the libary in /usr/local/lib/. And I think the compiler finds the files ...