mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-12-03 11:57:06 +00:00
Add PLATFORM_SPECIFIC_LIBRARIES to link platform specific libraries
This commit is contained in:
parent
1672429f22
commit
3a73d80be4
@ -39,15 +39,18 @@ IF( WIN32 )
|
|||||||
SET( GL_LIBRARY opengl32 )
|
SET( GL_LIBRARY opengl32 )
|
||||||
ELSEIF( APPLE )
|
ELSEIF( APPLE )
|
||||||
FIND_LIBRARY( GL_LIBRARY OpenGL )
|
FIND_LIBRARY( GL_LIBRARY OpenGL )
|
||||||
|
FIND_LIBRARY( AGL_LIBRARY AGL )
|
||||||
|
SET( PLATFORM_SPECIFIC_LIBRARIES ${AGL_LIBRARY} )
|
||||||
ELSE( )
|
ELSE( )
|
||||||
SET( GL_LIBRARY GL X11 dl Xext )
|
SET( GL_LIBRARY GL )
|
||||||
|
SET( PLATFORM_SPECIFIC_LIBRARIES X11 dl Xext )
|
||||||
ENDIF( )
|
ENDIF( )
|
||||||
|
|
||||||
IF ( glew-cmake_BUILD_STATIC )
|
IF ( glew-cmake_BUILD_STATIC )
|
||||||
SET_PROPERTY( TARGET libglew_static PROPERTY ARCHIVE_OUTPUT_NAME "glew" )
|
SET_PROPERTY( TARGET libglew_static PROPERTY ARCHIVE_OUTPUT_NAME "glew" )
|
||||||
SET_PROPERTY( TARGET libglew_static PROPERTY DEBUG_POSTFIX d )
|
SET_PROPERTY( TARGET libglew_static PROPERTY DEBUG_POSTFIX d )
|
||||||
INSTALL( TARGETS libglew_static DESTINATION lib )
|
INSTALL( TARGETS libglew_static DESTINATION lib )
|
||||||
TARGET_LINK_LIBRARIES( libglew_static ${GL_LIBRARY} )
|
TARGET_LINK_LIBRARIES( libglew_static ${GL_LIBRARY} ${PLATFORM_SPECIFIC_LIBRARIES} )
|
||||||
ENDIF ( )
|
ENDIF ( )
|
||||||
|
|
||||||
IF ( glew-cmake_BUILD_SHARED )
|
IF ( glew-cmake_BUILD_SHARED )
|
||||||
@ -58,7 +61,7 @@ IF ( glew-cmake_BUILD_SHARED )
|
|||||||
ENDIF( )
|
ENDIF( )
|
||||||
SET_PROPERTY( TARGET libglew_shared PROPERTY DEBUG_POSTFIX d )
|
SET_PROPERTY( TARGET libglew_shared PROPERTY DEBUG_POSTFIX d )
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES( libglew_shared ${GL_LIBRARY} )
|
TARGET_LINK_LIBRARIES( libglew_shared ${GL_LIBRARY} ${PLATFORM_SPECIFIC_LIBRARIES} )
|
||||||
INSTALL( TARGETS libglew_shared DESTINATION lib )
|
INSTALL( TARGETS libglew_shared DESTINATION lib )
|
||||||
ENDIF ( )
|
ENDIF ( )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user