mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-23 07:05:07 +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 )
|
||||
ELSEIF( APPLE )
|
||||
FIND_LIBRARY( GL_LIBRARY OpenGL )
|
||||
FIND_LIBRARY( AGL_LIBRARY AGL )
|
||||
SET( PLATFORM_SPECIFIC_LIBRARIES ${AGL_LIBRARY} )
|
||||
ELSE( )
|
||||
SET( GL_LIBRARY GL X11 dl Xext )
|
||||
SET( GL_LIBRARY GL )
|
||||
SET( PLATFORM_SPECIFIC_LIBRARIES X11 dl Xext )
|
||||
ENDIF( )
|
||||
|
||||
IF ( glew-cmake_BUILD_STATIC )
|
||||
SET_PROPERTY( TARGET libglew_static PROPERTY ARCHIVE_OUTPUT_NAME "glew" )
|
||||
SET_PROPERTY( TARGET libglew_static PROPERTY DEBUG_POSTFIX d )
|
||||
INSTALL( TARGETS libglew_static DESTINATION lib )
|
||||
TARGET_LINK_LIBRARIES( libglew_static ${GL_LIBRARY} )
|
||||
TARGET_LINK_LIBRARIES( libglew_static ${GL_LIBRARY} ${PLATFORM_SPECIFIC_LIBRARIES} )
|
||||
ENDIF ( )
|
||||
|
||||
IF ( glew-cmake_BUILD_SHARED )
|
||||
@ -58,7 +61,7 @@ IF ( glew-cmake_BUILD_SHARED )
|
||||
ENDIF( )
|
||||
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 )
|
||||
ENDIF ( )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user