mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-26 00:21:57 +00:00
Fix shared library build for mingw
This commit is contained in:
parent
f1c0b06b1b
commit
78f10dd0e0
@ -178,13 +178,20 @@ if(glew-cmake_BUILD_SHARED)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(libglew_shared PRIVATE GLEW_BUILD)
|
||||
if(MINGW)
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||
target_link_options(libglew_shared PRIVATE -nostdlib)
|
||||
else()
|
||||
target_link_libraries(libglew_shared PRIVATE -nostdlib)
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND GLEW_TARGETS libglew_shared)
|
||||
endif()
|
||||
|
||||
foreach(GLEW_TARGET ${GLEW_TARGETS})
|
||||
target_compile_definitions(${GLEW_TARGET} PUBLIC ${DEFINITIONS})
|
||||
target_include_directories(${GLEW_TARGET} PUBLIC ${INCLUDE_DIR})
|
||||
target_link_libraries(${GLEW_TARGET} ${LIBRARIES})
|
||||
target_link_libraries(${GLEW_TARGET} PUBLIC ${LIBRARIES})
|
||||
set_target_properties(${GLEW_TARGET} PROPERTIES VERSION ${GLEW_VERSION})
|
||||
endforeach()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user