mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-11 13:09:04 +08:00
Add support for static GLFW3 library linking
This commit is contained in:
parent
174334eaf4
commit
f1b5bb12fd
@ -11,6 +11,12 @@ if (apple)
|
|||||||
find_library(COCOA_LIBRARY Cocoa)
|
find_library(COCOA_LIBRARY Cocoa)
|
||||||
find_library(COREVIDEO_LIBRARY CoreVideo)
|
find_library(COREVIDEO_LIBRARY CoreVideo)
|
||||||
find_library(IOKIT_LIBRARY IOKit)
|
find_library(IOKIT_LIBRARY IOKit)
|
||||||
|
else ()
|
||||||
|
if (NOT win32)
|
||||||
|
# This means it is Unices
|
||||||
|
set ( GLFW3_UNIX_LINK_LIBRARIES X11 Xxf86vm Xrandr Xi Xinerama Xcursor )
|
||||||
|
find_package (Threads)
|
||||||
|
endif()
|
||||||
endif (apple)
|
endif (apple)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
@ -29,6 +35,7 @@ add_executable(glview
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries ( glview
|
target_link_libraries ( glview
|
||||||
|
${GLFW3_UNIX_LINK_LIBRARIES}
|
||||||
${GLEW_LIBRARY}
|
${GLEW_LIBRARY}
|
||||||
${GLFW3_glfw_LIBRARY}
|
${GLFW3_glfw_LIBRARY}
|
||||||
${OPENGL_gl_LIBRARY}
|
${OPENGL_gl_LIBRARY}
|
||||||
@ -36,6 +43,8 @@ target_link_libraries ( glview
|
|||||||
${COCOA_LIBRARY}
|
${COCOA_LIBRARY}
|
||||||
${COREVIDEO_LIBRARY}
|
${COREVIDEO_LIBRARY}
|
||||||
${IOKIT_LIBRARY}
|
${IOKIT_LIBRARY}
|
||||||
|
${CMAKE_DL_LIBS}
|
||||||
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
)
|
)
|
||||||
|
|
||||||
install ( TARGETS
|
install ( TARGETS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user