ref: 700e888f729a6aa8d2479d42ec5f4112afe744f6
parent: 8ff5ce588667377cf3f47be9d0ed12345fd7c505
parent: b7ae731f2111e4766fce4a73bd262be69fbd4c40
author: DMHSW <6974902+gek169@users.noreply.github.com>
date: Mon Jul 19 17:11:30 EDT 2021
Merge pull request #8 from starseeker/main 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)