Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azriel91/conan_cmake
CMake macros and tools
https://github.com/azriel91/conan_cmake
Last synced: about 2 months ago
JSON representation
CMake macros and tools
- Host: GitHub
- URL: https://github.com/azriel91/conan_cmake
- Owner: azriel91
- Created: 2015-12-29T02:28:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-29T02:31:31.000Z (about 9 years ago)
- Last Synced: 2024-10-14T02:48:02.575Z (3 months ago)
- Language: CMake
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CMake Macros and Tools
1. Add the requirement into your project's **conanfile.py**:
```python
# Either:
requires = 'conan_cmake/0.1.0@azriel91/stable'# Or:
def requirements(self):
""" Declare here your project requirements or configure any of them """
self.requires('conan_cmake/0.1.0@azriel91/stable')
```2. Use the `conan install [settings] [options]` command to download it:
```bash
conan install --build=missing
```3. Include the CMake macros in the **CMakeLists.txt** file for your conan project:
```cmake
include(conanbuildinfo.cmake)
conan_basic_setup()
include("${CONAN_CONAN_CMAKE_ROOT}/conanTools.cmake")
```Now you can use directly the macros defined in **conanTools.cmake**:
```cmake
activate_cpp11(${PROJECT_TARGET}) # Activate C++11 for a target
activate_cpp11(INTERFACE ${PROJECT_TARGET}) # Activate C++11 for an INTERFACE targetadd_osx_framework(Foundation ${PROJECT_TARGET}) # Add the foundation OSX Framework
```## Notes
This was originally from [biicode/cmake](https://www.biicode.com/biicode/cmake), and adapted for [conan](https://www.conan.io/).