ref: b7ae731f2111e4766fce4a73bd262be69fbd4c40
parent: 8ff5ce588667377cf3f47be9d0ed12345fd7c505
author: Clifford Yapp <238416+starseeker@users.noreply.github.com>
date: Mon Jul 19 16:35:24 EDT 2021
Correct SHARED lib guard, add missing -W flag
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -28,7 +28,7 @@
ztriangle.c
)
-if(TINYGL_BUILD_STATIC)
+if(TINYGL_BUILD_SHARED)
add_library(tinygl SHARED ${tinygl_srcs})
target_include_directories(tinygl PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include)
install(TARGETS tinygl
@@ -36,9 +36,9 @@
LIBRARY DESTINATION ${LIB_DIR}
ARCHIVE DESTINATION ${LIB_DIR})
if(NOT MSVC)
- target_compile_options(tinygl PRIVATE -O3 -DNDEBUG -pedantic -march=native -Wall)
+ target_compile_options(tinygl PRIVATE -O3 -DNDEBUG -pedantic -march=native -Wall -Wno-unused-function)
endif(NOT MSVC)
-endif(TINYGL_BUILD_STATIC)
+endif(TINYGL_BUILD_SHARED)
if(TINYGL_BUILD_STATIC)
add_library(tinygl-static STATIC ${tinygl_srcs})
@@ -48,7 +48,7 @@
LIBRARY DESTINATION ${LIB_DIR}
ARCHIVE DESTINATION ${LIB_DIR})
if(NOT MSVC)
- target_compile_options(tinygl-static PRIVATE -O3 -DNDEBUG -pedantic -march=native -Wall)
+ target_compile_options(tinygl-static PRIVATE -O3 -DNDEBUG -pedantic -march=native -Wall -Wno-unused-function)
endif(NOT MSVC)
endif(TINYGL_BUILD_STATIC)