Merge pull request #82 from filipwasil/develop
Enable building as shared library
This commit is contained in:
@@ -22,11 +22,14 @@ set(tinyobjloader-examples-objsticher
|
|||||||
${TINYOBJLOADEREXAMPLES_DIR}/obj_sticher/obj_sticher.cc
|
${TINYOBJLOADEREXAMPLES_DIR}/obj_sticher/obj_sticher.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(tinyobjloader
|
|
||||||
${tinyobjloader-Source}
|
|
||||||
)
|
|
||||||
|
|
||||||
option(TINYOBJLOADER_BUILD_TEST_LOADER "Build Example Loader Application" OFF)
|
option(TINYOBJLOADER_BUILD_TEST_LOADER "Build Example Loader Application" OFF)
|
||||||
|
option(TINYOBJLOADER_COMPILATION_SHARED "Build as shared library" OFF)
|
||||||
|
|
||||||
|
if (TINYOBJLOADER_COMPILATION_SHARED)
|
||||||
|
add_library(tinyobjloader SHARED ${tinyobjloader-Source})
|
||||||
|
else()
|
||||||
|
add_library(tinyobjloader STATIC ${tinyobjloader-Source})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(TINYOBJLOADER_BUILD_TEST_LOADER)
|
if(TINYOBJLOADER_BUILD_TEST_LOADER)
|
||||||
add_executable(test_loader ${tinyobjloader-Example-Source})
|
add_executable(test_loader ${tinyobjloader-Example-Source})
|
||||||
|
|||||||
Reference in New Issue
Block a user