cmake Questions

2

Including external libraries in a cmake project is usually performed using find_package(). But in a large multi-application / multi-library project, it is typical for some 3rd-party and/or system ...
Dispassion asked 12/7, 2018 at 6:10

4

I have a simple project where the file structure looks like this: - CMakeLists.txt - main.cpp The CMakeLists.txtlooks like this: # Project initialization cmake_minimum_required (VERSION 2.6) pr...
Nobukonoby asked 16/1, 2019 at 2:12

2

Solved

I've following issue. I'm tring to use native mechanism build in CMake for cross compilation. I prepared following toolchain.cmake file: set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR arm...
Ballottement asked 22/8, 2016 at 8:50

3

Solved

I would like to rename the installer file that CPack (v2.8.7) produces to include a version number that is obtained at build time from the version control system. It appears this cannot be be done ...
Needlefish asked 8/3, 2012 at 4:48

2

I got this error when launching old flutter app for dekstop windows. I was to try change version on every CMakeList.txt to 2.8...3.5 on windows folder, nothing happened and I got another error. an...
Curia asked 21/12, 2023 at 2:9

4

When I run the command cmake --version It gives me the version. But when I run import cmake It gives the error cmake module not present. I am stuck and not getting how to resolve it
Cromwell asked 22/11, 2019 at 10:33

2

I am trying to ignore the unused parameter warning using the new c++17 attribute [[maybe_unused]], as below. int main([[maybe_unused]] int argc, char** argv) { //... } But I still get warning: ...
Rote asked 10/6, 2018 at 14:50

1

Solved

I am trying to add external dependencies to my new cmake project in the cleanest and modern cmake way possible. I want to download these dependencies during configuration time. My problem is that a...
Recurved asked 19/5, 2021 at 8:39

2

Solved

I have a project that uses CMake and builds inside a deeply nested set of directories on Windows and typically fails due to excessive path lengths. Based on this answer - How to set the Maximum Pat...
Busterbustle asked 12/7, 2021 at 17:35

6

I am trying to follow the simple example for embedding python within c++ using pybind11 as found on this page. However, when trying to use cmake to build the solution, I keep getting an error that ...
Flyblow asked 4/8, 2020 at 20:26

7

Solved

I have to build miktex source code. I install source code from github they give me link to build it: https://miktex.org/howto/build-mac. I follow the steps given in the link. When I run cmake .....
Declaratory asked 26/9, 2018 at 5:26

7

Solved

I'm currently using Conan on a C++ project using sqlite_orm as a dependency. When using my personal include (like myClass.hpp for example) Visual Studio Code is able to provide auto-completion but...
Grano asked 24/9, 2019 at 10:8

3

I'm having trouble setting a configuration variable via the command line. I can't determine it from the system, so I expect the user to specify: cmake -DCMAKE_TOOLCHAIN_FILE=../android.toolchain -...
Endocrine asked 19/2, 2015 at 17:51

6

I'm trying to add an application icon to an application I'm writing, following what is described in https://doc.qt.io/qt-5/appicon.html I'm using Qt Desktop 5.15.2 (64) and 6.1.2 (64) for both MinG...
Bespoke asked 25/7, 2021 at 10:10

3

Trying to follow the install instructions from a GitHub page: https://github.com/TASEmulators/fceux I went through with installing Qt6 and when I do the following this happens: mkdir build cd build...
Ruthful asked 11/2, 2022 at 19:10

2

Solved

I had an issue while installing headptrack with CMake when running cmake -DCMAKE_BUILD_TYPE=Release .. in heaptrack/build -- Could NOT find ZSTD (missing: ZSTD_LIBRARY ZSTD_INCLUDE_DIR) CMake Err...
Hydrothorax asked 28/11, 2019 at 16:53

1

I am trying to make my code compile on Windows, and read since a couple of days all opened discussions on stackoverflow on the subject, without finding a solution. I installed openssl with choco in...
Fulbert asked 29/2 at 10:12

4

How can I get the basename of a target library with CMake? I'm creating a library with the CMake variable name ${lib} as in set(lib lib) add_library(${lib} ... I need the basename of the genera...
Bobbysoxer asked 20/9, 2015 at 5:58

4

Solved

Is there a way to get all targets of a CMake project from within the top level CMakeLists.txt, i.e. iterate over the targets programmatically? The reason I want to do this is to apply some XCode s...
Jeuz asked 25/5, 2016 at 10:52

3

Solved

I'm trying to generate Ninja makefiles to cross compile a C++ project with Clang for an ARM Cortex A5 CPU. I created a toolchain file for CMake but it seems like there is an error or something miss...
Vasectomy asked 5/2, 2019 at 17:10

4

Solved

I am using Point cloud library 1.5.1. When I run CMake 3.4.0-rc2 to build my project, it has error: Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) How do I fix this error?
Farci asked 27/10, 2015 at 23:2

1

When starting a new C++ project on VS Code with CMake Tools extension, we can run the "CMake: Quick Start" command to generate a basic CMakeLists.txt file with basic project configuration...
Lauraine asked 10/11, 2022 at 21:24

1

Can we generate a CMakeFile.txt using CMake Tool Extension in the visual studio Code, Or is there any way to generate, given src file have 50 .cpp files, need to generate CMakeList.txt automaticall...
Skim asked 9/10, 2023 at 14:26

5

Solved

I have relatively complex CMake files and I am wondering if there is a way to automatically reformat a CMakeLists.txt and beautify it for easier reading. Some simple tricks would do the jobs, such ...
Tunisia asked 3/1, 2017 at 15:4

4

Solved

In this tutorial it shows the following example for exporting C functions ./emcc tests/hello_function.cpp -o function.html -s EXPORTED_FUNCTIONS='["_int_sqrt"]' -s EXPORTED_RUNTIME_METHOD...
Faena asked 25/6, 2020 at 12:48

© 2022 - 2024 — McMap. All rights reserved.