Questions tagged [cmake-language]

CMake () input files are written in the “CMake Language” in source files named CMakeLists.txt or ending in a .cmake file name extension.

Official Documentation

Additional Resources

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…
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 |…
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…
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…
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",…
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…
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}/"…
1 2 3 4
5