Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ set(TINYOBJLOADER_VERSION 1.0.4)
option(TINYOBJLOADER_USE_DOUBLE "Build library with double precision instead of single (float)" OFF)

if(TINYOBJLOADER_USE_DOUBLE)
add_definitions(-DTINYOBJLOADER_USE_DOUBLE)
set(LIBRARY_NAME ${PROJECT_NAME}_double)
else()
set(LIBRARY_NAME ${PROJECT_NAME})
Expand Down Expand Up @@ -56,6 +55,10 @@ if(BUILD_SHARED_LIBS)
)
endif()

if(TINYOBJLOADER_USE_DOUBLE)
target_compile_definitions(${LIBRARY_NAME} PUBLIC TINYOBJLOADER_USE_DOUBLE)
endif()

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

target_include_directories(${LIBRARY_NAME} INTERFACE
Expand Down