Python bindings for CMake.
Project description
pycmake
python bindings for cmake.
how
1. write CMakeLists.py
from pycmake.cmake import *
from pycmake import utils
import os
cmake_cmake_minimum_required(CMAKE_VERSION, 3.6)
cmake_project("test")
cmake_add_executable("test")
cmake_target_sources("test", CMAKE_PRIVATE, "main.cpp")
cmake_target_link_libraries("test", "-framework Cocoa", "x")
cmake_add_subdirectory("test_subdir")
cmake_set("my_variable1", "test", CMAKE_CACHE, CMAKE_STRING, "This is my_variable")
cmake_target_sources(
"test",
CMAKE_PRIVATE,
utils.find_files_in_dir_with_extensions(
os.path.join(CMAKE_CURRENT_SOURCE_DIR, "src"),
extensions="(h)|(cpp)",
excluding_dirs="exclude_me",
),
)
cmake_if(CMAKE_NOT, "TEST_OPT")
cmake_include("test/CMakeLists.txt")
cmake_call("custom_fn", "p0", "p1")
cmake_endif()
2. python CMakeLists.py
run python CMakeLists.py
to generate your CMakeLists.txt file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for pycmake-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4c85fe784b97cd74899b924e19bf9fac4dec6a2b6485762d2b80da5b4d3a8b8 |
|
MD5 | 2f9acfadba303e242dc6f753eb3fa903 |
|
BLAKE2b-256 | 52a69561303a1b497472126a5febd12f7b4c123598cb6f442cdc997766788dba |