We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e0beb00 + 401de47 commit c2f194aCopy full SHA for c2f194a
CMakeLists.txt
@@ -10,7 +10,6 @@ set(TINYOBJLOADER_VERSION 1.0.4)
10
option(TINYOBJLOADER_USE_DOUBLE "Build library with double precision instead of single (float)" OFF)
11
12
if(TINYOBJLOADER_USE_DOUBLE)
13
- add_definitions(-DTINYOBJLOADER_USE_DOUBLE)
14
set(LIBRARY_NAME ${PROJECT_NAME}_double)
15
else()
16
set(LIBRARY_NAME ${PROJECT_NAME})
@@ -56,6 +55,10 @@ if(BUILD_SHARED_LIBS)
56
55
)
57
endif()
58
+if(TINYOBJLOADER_USE_DOUBLE)
59
+ target_compile_definitions(${LIBRARY_NAME} PUBLIC TINYOBJLOADER_USE_DOUBLE)
60
+endif()
61
+
62
set_target_properties(${LIBRARY_NAME} PROPERTIES VERSION ${TINYOBJLOADER_VERSION})
63
64
target_include_directories(${LIBRARY_NAME} INTERFACE
0 commit comments