Add CMake options to toggle the TestLoader application and OBJ Sticher application so that including the project has a smaller footprint

This commit is contained in:
Alexander Bock
2015-05-21 22:22:59 +02:00
parent 911f0dd636
commit d828e7521d

View File

@@ -26,18 +26,26 @@ add_library(tinyobjloader
${tinyobjloader-Source}
)
add_executable(test_loader ${tinyobjloader-Test-Source})
target_link_libraries(test_loader tinyobjloader)
option(TINYOBJLOADER_BUILD_TEST_LOADER "Build Test Loader Application" OFF)
add_executable(obj_sticher ${tinyobjloader-examples-objsticher})
target_link_libraries(obj_sticher tinyobjloader)
if(TINYOBJLOADER_BUILD_TEST_LOADER)
add_executable(test_loader ${tinyobjloader-Test-Source})
target_link_libraries(test_loader tinyobjloader)
endif()
#Installation
install ( TARGETS
option(TINYOBJLOADER_BUILD_OBJ_STICHER "Build OBJ Sticher Application" OFF)
if (TINYOBJLOADER_BUILD_OBJ_STICHER)
add_executable(obj_sticher ${tinyobjloader-examples-objsticher})
target_link_libraries(obj_sticher tinyobjloader)
install ( TARGETS
obj_sticher
DESTINATION
bin
)
endif()
#Installation
install ( TARGETS
tinyobjloader
DESTINATION