# Hacking

## Controlling CMake using scikit-build

You can drive CMake directly using scikit-build:

    """ Use scikit-build's `cmaker` to control CMake configuration and build.

    1. Use `cmaker` to define an object that provides convenient access to
       CMake's configure and build functionality.

    2. Use defined object, `maker`, to call `configure()` to read the
       `CMakeLists.txt` file in the current directory and generate a Makefile,
       Visual Studio solution, or whatever is appropriate for your platform.

    3. Call `make()` on the object to execute the build with the
       appropriate build tool and perform installation to the local directory.
    """
    from skbuild import cmaker
    maker = cmaker.CMaker()

    maker.configure()

    maker.make()

See `skbuild.cmaker.CMaker` for more details.

## Internal API

### skbuild

- skbuild package
  - `setup()`
  - Subpackages
    - skbuild.command package
      - `CommandMixinProtocol`
      - `set_build_base_mixin`
      - Submodules
      - skbuild.command.bdist module
      - skbuild.command.bdist_wheel module
      - skbuild.command.build module
      - skbuild.command.build_ext module
      - skbuild.command.build_py module
      - skbuild.command.clean module
      - skbuild.command.egg_info module
      - skbuild.command.generate_source_manifest module
      - skbuild.command.install module
      - skbuild.command.install_lib module
      - skbuild.command.install_scripts module
      - skbuild.command.sdist module
      - skbuild.command.test module
    - skbuild.platform_specifics package
      - `CMakeGenerator`
      - `get_platform()`
      - Submodules
      - skbuild.platform_specifics.abstract module
      - skbuild.platform_specifics.bsd module
      - skbuild.platform_specifics.cygwin module
      - skbuild.platform_specifics.linux module
      - skbuild.platform_specifics.osx module
      - skbuild.platform_specifics.aix module
      - skbuild.platform_specifics.platform_factory module
      - skbuild.platform_specifics.unix module
      - skbuild.platform_specifics.windows module
    - skbuild.utils package
      - `CommonLog`
      - `Distribution`
      - `PythonModuleFinder`
      - `distribution_hide_listing()`
      - `mkdir_p()`
      - `parse_manifestin()`
      - `push_dir`
      - `to_platform_path()`
      - `to_unix_path()`
  - Submodules
  - skbuild.cmaker module
    - `CMaker`
      - `CMaker.check_for_bad_installs()`
      - `CMaker.configure()`
      - `CMaker.get_cached()`
      - `CMaker.get_cached_generator_env()`
      - `CMaker.get_cached_generator_name()`
      - `CMaker.get_python_include_dir()`
      - `CMaker.get_python_library()`
      - `CMaker.get_python_version()`
      - `CMaker.install()`
      - `CMaker.make()`
      - `CMaker.make_impl()`
    - `get_cmake_version()`
    - `has_cmake_cache_arg()`
    - `pop_arg()`
  - skbuild.constants module
    - `CMAKE_BUILD_DIR()`
    - `CMAKE_DEFAULT_EXECUTABLE`
    - `CMAKE_INSTALL_DIR()`
    - `CMAKE_SPEC_FILE()`
    - `SETUPTOOLS_INSTALL_DIR()`
    - `SKBUILD_DIR()`
    - `SKBUILD_MARKER_FILE()`
    - `get_cmake_version()`
    - `set_skbuild_plat_name()`
    - `skbuild_plat_name()`
  - skbuild.exceptions module
    - `SKBuildError`
    - `SKBuildGeneratorNotFoundError`
    - `SKBuildInvalidFileInstallationError`
  - skbuild.setuptools_wrap module
    - `create_skbuild_argparser()`
    - `get_default_include_package_data()`
    - `parse_args()`
    - `parse_skbuild_args()`
    - `setup()`
    - `strip_package()`

## Internal CMake Modules

- targetLinkLibrariesWithDynamicLookup