GAMES101: Introduction to Modern Computer Graphics - Yan Lingqi
Course Link: GAMES101
GitHub Repo: https://github.com/garethng/Games101-Homework
macOS Usage#
Install vcpkg#
brew install vcpkg
Install Eigen#
Add and edit the vcpkg.json file to include Eigen as a dependency.
{
"name": "transformation",
"version-string": "1.0.0",
"dependencies": [
"eigen3"
]
}
Install Dependencies#
vcpkg install
Modify CMakeLists.txt#
# Set CMAKE_PREFIX_PATH
list(APPEND CMAKE_PREFIX_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/vcpkg_installed/arm64-osx"
)
set(CMAKE_TOOLCHAIN_FILE "${ENV{HOME}}/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "Vcpkg toolchain file")
find_package(Eigen3 CONFIG REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIRS})
message(STATUS "EIGEN3_INCLUDE_DIRS: ${EIGEN3_INCLUDE_DIRS}")
add_executable (Transformation main.cpp)
target_link_libraries(Transformation PRIVATE Eigen3::Eigen)
Compile#
mkdir build
cd build
cmake ..
make