Skip to content

CMake scripts to provide helpers and factorize common setups for CMake based projects.

License

Notifications You must be signed in to change notification settings

FranzPoize/cmake_helper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMake helper

CMake scripts to provide helpers and factorize common setups for CMake based projects.

Usage

This project should be added as a submodule to downstream project repository, cloning it in 'cmake/' subfolder:

cd $PROJECT
git submodule add https://github.com/Adnn/cmake_helper.git cmake

It is then a matter of including the include.cmake file at the beginning of downstream's root CMakeLists.txt

cmake_minimum_required(VERSION 3.20)
project(Downstream)

# Include cmake_helper submodule
include("cmake/include.cmake")

...

This will initialize cmake helpers, and make functions in utilities/cmc-base.cmake available. Additional functions defined in other files from utilities/ are made available by including the corresponding file with its basename. E.g. to access cmc_install_with_folders defined in utilities/cmc-install.cmake:

...

include(cmc-install)
cmc_install_with_folders(FILES a/a.h b/b.h DESTINATION include/)

...

About

CMake scripts to provide helpers and factorize common setups for CMake based projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 100.0%