Skip to content

Commit 89d5b69

Browse files
committed
Added a Cmake build system configuration
1 parent 89a5192 commit 89d5b69

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#Common folder for building objects
2+
build/

CMakeLists.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#Tiny Object Loader Cmake configuration file.
2+
#This configures the Cmake system with multiple properties, depending
3+
#on the platform and configuration it is set to build in.
4+
project(tinyobjloader)
5+
cmake_minimum_required(VERSION 2.8.6)
6+
7+
#Folder Shortcuts
8+
set(TINYOBJLOADEREXAMPLES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/examples)
9+
10+
set(tinyobjloader-Source
11+
${CMAKE_CURRENT_SOURCE_DIR}/tiny_obj_loader.h
12+
${CMAKE_CURRENT_SOURCE_DIR}/tiny_obj_loader.cc
13+
)
14+
15+
set(tinyobjloader-Test-Source
16+
${CMAKE_CURRENT_SOURCE_DIR}/test.cc
17+
)
18+
19+
set(tinyobjloader-examples-objsticher
20+
${TINYOBJLOADEREXAMPLES_DIR}/obj_sticher/obj_writer.h
21+
${TINYOBJLOADEREXAMPLES_DIR}/obj_sticher/obj_writer.cc
22+
${TINYOBJLOADEREXAMPLES_DIR}/obj_sticher/obj_sticher.cc
23+
)
24+
25+
add_library(tinyobjloader
26+
${tinyobjloader-Source}
27+
)
28+
29+
add_executable(test ${tinyobjloader-Test-Source})
30+
target_link_libraries(test tinyobjloader)
31+
32+
add_executable(obj_sticher ${tinyobjloader-examples-objsticher})
33+
target_link_libraries(obj_sticher tinyobjloader)

0 commit comments

Comments
 (0)