vcpkg/ports/nanovg/CMakeLists.txt
Alvin ee0bfad1cf [nanogui] Add new port (#8302)
* [nanogui]Add new port.

* [nanogui]Repatch.

* [nanovg]Update the CONTROL version of the nanovg port.
2019-09-26 17:04:10 -07:00

32 lines
929 B
CMake

cmake_minimum_required(VERSION 3.11)
project(nanovg C)
set(NANOVG_SOURCES src/nanovg.c)
set(NANOVG_HEADERS src/nanovg.h src/nanovg_gl.h src/nanovg_gl_utils.h src/stb_image.h)
add_library(nanovg STATIC ${NANOVG_SOURCES} ${NANOVG_HEADERS})
set_target_properties(nanovg PROPERTIES PUBLIC_HEADER "${NANOVG_HEADERS}")
target_include_directories(nanovg PRIVATE 3rdparty/nanovg/src)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(nanovg PRIVATE DEBUG)
else()
target_compile_definitions(nanovg PRIVATE NDEBUG)
endif()
install(TARGETS nanovg
EXPORT nanovgTargets
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include)
install(EXPORT nanovgTargets
FILE nanovgTargets.cmake
NAMESPACE nanovg::
DESTINATION share/nanovg)
include(CMakePackageConfigHelpers)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/nanovgConfig.cmake
DESTINATION share/nanovg)