mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-31 05:03:22 +08:00
05c411da66
* [libtess2] add port * [libtess2] add version * [libtess2] forgot project name * [libtess2] case sensitive in paths * [libtess2] update version with last sha * Modernize with target_sources, add missing quotes, and add vcpkg_check_linkage since the port only makes a static output. Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
36 lines
1.1 KiB
CMake
36 lines
1.1 KiB
CMake
cmake_minimum_required(VERSION 3.21)
|
|
|
|
project(libtess2)
|
|
|
|
# Tesselator
|
|
add_library(libtess2 STATIC)
|
|
|
|
target_sources(libtess2 PRIVATE
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/Source/bucketalloc.c"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/Source/dict.c"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/Source/geom.c"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/Source/mesh.c"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/Source/priorityq.c"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/Source/sweep.c"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/Source/tess.c")
|
|
|
|
target_include_directories(libtess2 PUBLIC
|
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Include>"
|
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Source>"
|
|
)
|
|
set_target_properties(libtess2 PROPERTIES LINKER_LANGUAGE CXX)
|
|
|
|
install(TARGETS libtess2 EXPORT unofficial-libtess2-config)
|
|
|
|
install(
|
|
FILES "${CMAKE_CURRENT_SOURCE_DIR}/Include/tesselator.h"
|
|
TYPE INCLUDE
|
|
)
|
|
|
|
install(
|
|
EXPORT unofficial-libtess2-config
|
|
NAMESPACE unofficial::libtess2::
|
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-libtess2"
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
|
)
|