forked from openframeworks/openFrameworks
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4532d60
commit 82f7da6
Showing
6 changed files
with
104 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
project(libtess2) | ||
|
||
set(LIBTESS2_SOURCES | ||
source/Source/bucketalloc.c | ||
source/Source/bucketalloc.h | ||
source/Source/dict.c | ||
source/Source/dict.h | ||
source/Source/geom.c | ||
source/Source/geom.h | ||
source/Source/mesh.c | ||
source/Source/mesh.h | ||
source/Source/priorityq.c | ||
source/Source/priorityq.h | ||
source/Source/sweep.c | ||
source/Source/sweep.h | ||
source/Source/tess.c | ||
source/Source/tess.h | ||
) | ||
add_library(libtess2 STATIC ${LIBTESS2_SOURCES}) | ||
add_library(libtess2::libtess2 ALIAS libtess2) | ||
target_include_directories(libtess2 PUBLIC source/Source source/Include) | ||
target_compile_features(libtess2 PUBLIC c_std_99) | ||
|
||
set_target_properties(libtess2 PROPERTIES | ||
ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib | ||
ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/lib | ||
ARCHIVE_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BINARY_DIR}/lib | ||
ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/lib | ||
LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib | ||
LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/lib | ||
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BINARY_DIR}/lib | ||
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/lib | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from conan import ConanFile | ||
from conan.tools.scm import Git | ||
from conan.tools.files import copy | ||
from conan.tools.cmake import CMake | ||
from os.path import join | ||
|
||
class LibTess2Conan(ConanFile): | ||
name = "libtess2" | ||
version = "1.0.2" | ||
package_type = "python-require" | ||
exports = "*" | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "CMakeDeps", "CMakeToolchain" | ||
|
||
def export_sources(self): | ||
copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder) | ||
|
||
def source(self): | ||
git = Git(self) | ||
git.clone(url="https://github.com/memononen/libtess2.git", target="source") | ||
git.folder = "source" | ||
git.checkout("v1.0.2") | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure(build_script_folder=self.export_sources_folder) | ||
cmake.build() | ||
|
||
def package(self): | ||
copy(self, "*.h", join(self.source_folder, "source", "Include"), join(self.package_folder, "include")) | ||
copy(self, "*.lib", join(self.source_folder, "lib"), join(self.package_folder, "lib")) | ||
copy(self, "*.pdb", join(self.source_folder, "lib"), join(self.package_folder, "lib")) | ||
copy(self, "*.a", join(self.source_folder, "lib"), join(self.package_folder, "lib")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters