From 89d5b69beebd59c97db54aa1ea19019a8d7d1a05 Mon Sep 17 00:00:00 2001 From: Bradley Clemetson Date: Sat, 25 Jan 2014 18:25:22 -0800 Subject: [PATCH] Added a Cmake build system configuration --- .gitignore | 2 ++ CMakeLists.txt | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..493e888 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +#Common folder for building objects +build/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..72bb155 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,33 @@ +#Tiny Object Loader Cmake configuration file. +#This configures the Cmake system with multiple properties, depending +#on the platform and configuration it is set to build in. +project(tinyobjloader) +cmake_minimum_required(VERSION 2.8.6) + +#Folder Shortcuts +set(TINYOBJLOADEREXAMPLES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/examples) + +set(tinyobjloader-Source + ${CMAKE_CURRENT_SOURCE_DIR}/tiny_obj_loader.h + ${CMAKE_CURRENT_SOURCE_DIR}/tiny_obj_loader.cc + ) + +set(tinyobjloader-Test-Source + ${CMAKE_CURRENT_SOURCE_DIR}/test.cc + ) + +set(tinyobjloader-examples-objsticher + ${TINYOBJLOADEREXAMPLES_DIR}/obj_sticher/obj_writer.h + ${TINYOBJLOADEREXAMPLES_DIR}/obj_sticher/obj_writer.cc + ${TINYOBJLOADEREXAMPLES_DIR}/obj_sticher/obj_sticher.cc + ) + +add_library(tinyobjloader + ${tinyobjloader-Source} + ) + +add_executable(test ${tinyobjloader-Test-Source}) +target_link_libraries(test tinyobjloader) + +add_executable(obj_sticher ${tinyobjloader-examples-objsticher}) +target_link_libraries(obj_sticher tinyobjloader) \ No newline at end of file