Skip to content

Commit f37fed3

Browse files
authored
Merge pull request tinyobjloader#196 from jasjuang/master
Use CMake built-in variable BUILD_SHARED_LIBS instead of custom TINYOBJLOADER_COMPILATION_SHARED
2 parents 40d00fd + 85d92bb commit f37fed3

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,13 @@ set(TINYOBJLOADER_PKGCONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
4646
set(TINYOBJLOADER_RUNTIME_DIR ${CMAKE_INSTALL_BINDIR})
4747

4848
option(TINYOBJLOADER_BUILD_TEST_LOADER "Build Example Loader Application" OFF)
49-
option(TINYOBJLOADER_COMPILATION_SHARED "Build as shared library" OFF)
5049

51-
if(TINYOBJLOADER_COMPILATION_SHARED)
52-
add_library(${LIBRARY_NAME} SHARED ${tinyobjloader-Source})
50+
add_library(${LIBRARY_NAME} ${tinyobjloader-Source})
51+
52+
if(BUILD_SHARED_LIBS)
5353
set_target_properties(${LIBRARY_NAME} PROPERTIES
5454
SOVERSION ${TINYOBJLOADER_SOVERSION}
5555
)
56-
else()
57-
add_library(${LIBRARY_NAME} STATIC ${tinyobjloader-Source})
5856
endif()
5957

6058
set_target_properties(${LIBRARY_NAME} PROPERTIES VERSION ${TINYOBJLOADER_VERSION})

0 commit comments

Comments
 (0)