CMake (cmake) input files are written in the “CMake Language” in source files named CMakeLists.txt
or ending in a .cmake
file name extension.
Questions tagged [cmake-language]
67 questions
0
votes
1 answer
Unknown CMake command "add_py_modules"
I'm setting up to build openage, a clone of AoE2 genie engine. My cmake command is not being processed. Is "add_py_modules" not possible here?
This is for windows 10, using vcpkg. Command used :
cmake…
![](../../users/profiles/11655544.webp)
Kenny Jorge
- 5
- 4
0
votes
0 answers
How to correctly link the path of external library in CMake?
In the CMakeLists.txt, if I define the .lib (static library) file path as absolute path, it's working correctly. But if I define the same as relative path, an error is thrown. How do I solve it without hard coded ?
File structure:
|--D
| |--Rohit
|…
![](../../users/profiles/6839253.webp)
Rohit
- 99
- 3
- 9
0
votes
1 answer
I want to Integrate ODBC in my Code for both linux and windows using CMakeLists.txt but its only working in windows
I am currently working on a project which requires SQL database. I want to make project platform independent so i am writing CMakeLists.txt but unfortunately its not working with linux currrently I have this part in CmakeLists.txt…
![](../../users/profiles/1993504.webp)
Shaoor Ahmad Qureshi
- 59
- 7
0
votes
0 answers
Usage of Variable for HINTS in find_package command
I write a generic function to support the search of the dependencies.
If I write the following command:
find_package(HDF5 REQUIRED HINTS /opt/cots/)
the cmake (version 3.13.4 on REHL7 ) is able to find correctly the dependencies and everything is…
![](../../users/profiles/7490134.webp)
Michele Belotti
- 65
- 2
- 9
0
votes
1 answer
CMake: Set Visual Studio project properties to inherit from parent (property sheet)
I'm using CMake 3.8.1 to generate Visual Studio 2015 Projects.
Adding a custom property sheet:
set_target_properties(${TARGET} PROPERTIES VS_USER_PROPS "my_settings.props")
Can't find the way in CMakeLists.txt to set "Output Directory",…
![](../../users/profiles/148132.webp)
sny
- 384
- 4
- 17
0
votes
1 answer
CMake syntax: how to negate if() and if()
CMake's if command [1] supports several signatures, starting with
if()
if()
if(NOT )
How to negate the first two?
If the CMake documentation is correct (which in my experience is far from certain), then my…
![](../../users/profiles/1017348.webp)
Joachim W
- 5,182
- 4
- 24
- 44
-2
votes
1 answer
cmake error( add_executable) I am not getting what eerror it is. Also i get CXX_STANDARD is set to invalid value '17'
cmake_minimum_required(VERSION 3.0)
project(FireliteApp C CXX)
set (CMAKE_CXX_STANDARD 17)
string(LENGTH "${CMAKE_SOURCE_DIR}/"…