Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/vcpkg #17

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
.vs/
.vscode/
.idea/
build/
.cache/
vcpkg_installed/
CMakeFiles/
CMakeCache.txt
cmake_install.cmake
GLTF_OPTIMIZER.VC.VC.opendb
GLTF_OPTIMIZER.VC.db
GLTF_OPTIMIZER/x64/
Expand Down
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 设置最低版本要求
cmake_minimum_required(VERSION 3.10)

# 设置项目名称
project(GLTF_TO_3DTiles)

set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")

# 添加子项目
add_subdirectory(GLTF_OPTIMIZER)
37 changes: 37 additions & 0 deletions GLTF_OPTIMIZER/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 设置最低版本要求
cmake_minimum_required(VERSION 3.22)

# 设置项目名称
project(GLTF_OPTIMIZER)

# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
set(CMAKE_PREFIX_PATH "${VCPKG_ROOT}/installed/arm64-osx")
find_package(boost_filesystem REQUIRED CONFIG)
MESSAGE(STATUS "boost_filesystem: ${boost_filesystem_FOUND} ${boost_INCLUDE_DIR}")
find_package(fmt CONFIG REQUIRED)

set(GLTF_OPTIMIZER_SOURCES
globals.h
gltfExporter.cpp
gltfExporter.h
LodExporter.cpp
LodExporter.h
main.cpp
MeshOptimizer.cpp
MeshOptimizer.h
MyMesh.h
Pipeline.cpp
Pipeline.h
SpatialTree.cpp
SpatialTree.h
utils.cpp
utils.h)
#find_package(vcg REQUIRED)
add_executable(main ${GLTF_OPTIMIZER_SOURCES})
set_target_properties(main PROPERTIES OUTPUT_NAME "GLTF_OPTIMIZER")
target_include_directories(main PUBLIC ./tinyGltf ${VCG_LIB} "${VCG_LIB}/eigenlib")
target_link_libraries(main PUBLIC fmt::fmt-header-only)
target_link_libraries(main PUBLIC Boost::filesystem)
Loading