plugins: python renderer: Add color output to cmake

This commit is contained in:
Mario Hüttel 2019-11-18 21:29:42 +01:00
parent 394efb79cf
commit 447d583103

View File

@ -2,14 +2,32 @@ project(pythonrenderer)
cmake_minimum_required(VERSION 2.8.8)
find_package(PythonLibs)
if(NOT WIN32)
string(ASCII 27 Esc)
set(ColorReset "${Esc}[m")
set(ColorBold "${Esc}[1m")
set(Red "${Esc}[31m")
set(Green "${Esc}[32m")
set(Yellow "${Esc}[33m")
set(Blue "${Esc}[34m")
set(Magenta "${Esc}[35m")
set(Cyan "${Esc}[36m")
set(White "${Esc}[37m")
set(BoldRed "${Esc}[1;31m")
set(BoldGreen "${Esc}[1;32m")
set(BoldYellow "${Esc}[1;33m")
set(BoldBlue "${Esc}[1;34m")
set(BoldMagenta "${Esc}[1;35m")
set(BoldCyan "${Esc}[1;36m")
set(BoldWhite "${Esc}[1;37m")
endif()
aux_source_directory(src SOURCES)
include_directories(${PYTHON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
link_libraries(${PYTHON_LIBRARIES} version)
message("Python version found: ${PYTHONLIBS_VERSION_STRING}")
message(${PYTHON_LIBRARIES})
message(${PYTHON_INCLUDE_DIRS})
message("${BoldCyan}Python version found: ${PYTHONLIBS_VERSION_STRING}${ColorReset}")
add_library(${PROJECT_NAME} SHARED EXCLUDE_FROM_ALL ${SOURCES})
add_dependencies(${PROJECT_NAME} version)