Skip to content

Commit

Permalink
Merge pull request tinyobjloader#196 from jasjuang/master
Browse files Browse the repository at this point in the history
Use CMake built-in variable BUILD_SHARED_LIBS instead of custom TINYOBJLOADER_COMPILATION_SHARED
  • Loading branch information
syoyo authored Jan 5, 2019
2 parents 40d00fd + 85d92bb commit f37fed3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ set(TINYOBJLOADER_PKGCONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
set(TINYOBJLOADER_RUNTIME_DIR ${CMAKE_INSTALL_BINDIR})

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(${LIBRARY_NAME} SHARED ${tinyobjloader-Source})
add_library(${LIBRARY_NAME} ${tinyobjloader-Source})

if(BUILD_SHARED_LIBS)
set_target_properties(${LIBRARY_NAME} PROPERTIES
SOVERSION ${TINYOBJLOADER_SOVERSION}
)
else()
add_library(${LIBRARY_NAME} STATIC ${tinyobjloader-Source})
endif()

set_target_properties(${LIBRARY_NAME} PROPERTIES VERSION ${TINYOBJLOADER_VERSION})
Expand Down

0 comments on commit f37fed3

Please sign in to comment.