Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
1 | project(KApiDox NONE) | 1 | project(KApiDox NONE) | ||
---|---|---|---|---|---|
2 | cmake_minimum_required(VERSION 3.0) | 2 | cmake_minimum_required(VERSION 3.0) | ||
3 | 3 | | |||
4 | find_package(PythonInterp REQUIRED) | 4 | find_package(PythonInterp REQUIRED) | ||
5 | 5 | | |||
6 | file(TO_NATIVE_PATH ${CMAKE_BINARY_DIR} BINARY_DIR) | 6 | if(WIN32) | ||
7 | # Needs native path and extra escaping of spaces | ||||
8 | file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}" BINARY_DIR) | ||||
9 | else() | ||||
10 | set(BINARY_DIR ${CMAKE_BINARY_DIR}) | ||||
11 | endif() | ||||
12 | | ||||
7 | add_custom_target(build ALL | 13 | add_custom_target(build ALL | ||
8 | COMMAND ${PYTHON_EXECUTABLE} setup.py build --build-base ${BINARY_DIR} | 14 | COMMAND ${PYTHON_EXECUTABLE} setup.py build --build-base ${BINARY_DIR} | ||
9 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | 15 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
10 | ) | 16 | ) | ||
11 | 17 | | |||
12 | # DESTDIR may be set at install time (eg: `make DESTDIR=/tmp/package install`) | 18 | # DESTDIR may be set at install time (eg: `make DESTDIR=/tmp/package install`) | ||
13 | # so we need to check for it when the install code is run and pass the appropriate | 19 | # so we need to check for it when the install code is run and pass the appropriate | ||
14 | # argument to distutils. | 20 | # argument to distutils. | ||
Show All 16 Lines |