vcpkg/ports/minitrace/CMakeLists.txt
Connor Fitzgerald 70847e191a [minitrace] Add new port (#5534)
* [minitrace] Add new port

* [minitrace] Install header into separate directory
2019-03-05 00:32:42 -08:00

33 lines
794 B
CMake

cmake_minimum_required(VERSION 3.8)
project(minitrace C)
set(minitrace_HEADERS minitrace.h)
set(minitrace_SOURCES minitrace.c)
add_library(minitrace ${minitrace_SOURCES})
# Install headers
install(FILES ${minitrace_HEADERS} DESTINATION include/minitrace)
# Install minitrace
install(
TARGETS minitrace EXPORT minitraceConfig
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
)
# Export config file for minitrace
export(
TARGETS minitrace
NAMESPACE minitrace::
FILE "${CMAKE_CURRENT_BINARY_DIR}/minitrace-config.cmake"
)
# Install config file
install(
EXPORT minitraceConfig
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/minitrace"
NAMESPACE minitrace::
)