mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2025-03-22 00:36:06 +00:00
CMakeLists.txt & glew source(2013.5.24)
This commit is contained in:
parent
41c1305a89
commit
5408d71c61
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,6 +1,6 @@
|
||||
*.pc
|
||||
/src/*.c
|
||||
/include/GL/*.h
|
||||
.DS_Store
|
||||
._.*
|
||||
/build/vc6/*.rc
|
||||
/auto/extensions
|
||||
/auto/registry
|
||||
|
42
CMakeLists.txt
Normal file
42
CMakeLists.txt
Normal file
@ -0,0 +1,42 @@
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.6 )
|
||||
PROJECT( "glew" )
|
||||
|
||||
SET( SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src )
|
||||
SET( INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include )
|
||||
|
||||
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib )
|
||||
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib )
|
||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${INCLUDE_DIR} )
|
||||
|
||||
IF( NOT USE_GLU )
|
||||
ADD_DEFINITIONS( -DGLEW_NO_GLU )
|
||||
ENDIF( )
|
||||
|
||||
ADD_LIBRARY( libglew_static STATIC ${SRC_DIR}/glew.c )
|
||||
ADD_LIBRARY( libglew_shared SHARED ${SRC_DIR}/glew.c )
|
||||
|
||||
SET_PROPERTY( TARGET libglew_static PROPERTY ARCHIVE_OUTPUT_NAME "libglew" )
|
||||
IF( WIN32 )
|
||||
SET_PROPERTY( TARGET libglew_shared PROPERTY RUNTIME_OUTPUT_NAME "glew" )
|
||||
ELSE( )
|
||||
SET_PROPERTY( TARGET libglew_shared PROPERTY LIBRARY_OUTPUT_NAME "libglew" )
|
||||
ENDIF( )
|
||||
|
||||
IF( ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR} )
|
||||
ADD_EXECUTABLE( glewinfo ${SRC_DIR}/glewinfo.c )
|
||||
ADD_EXECUTABLE( visualinfo ${SRC_DIR}/visualinfo.c )
|
||||
|
||||
IF( UNIX )
|
||||
SET( GL_LIBRARY GL )
|
||||
ELSEIF( APPLE )
|
||||
FIND_LIBRARY( GL_LIBRARY OpenGL )
|
||||
ELSEIF( WIN32 )
|
||||
SET( GL_LIBRARY opengl32 )
|
||||
ENDIF( )
|
||||
|
||||
TARGET_LINK_LIBRARIES( glewinfo libglew_static ${GL_LIBRARY} )
|
||||
TARGET_LINK_LIBRARIES( visualinfo libglew_static ${GL_LIBRARY} )
|
||||
|
||||
ENDIF( )
|
17447
include/GL/glew.h
Normal file
17447
include/GL/glew.h
Normal file
File diff suppressed because it is too large
Load Diff
1669
include/GL/glxew.h
Normal file
1669
include/GL/glxew.h
Normal file
File diff suppressed because it is too large
Load Diff
1421
include/GL/wglew.h
Normal file
1421
include/GL/wglew.h
Normal file
File diff suppressed because it is too large
Load Diff
17430
src/glew.c
Normal file
17430
src/glew.c
Normal file
File diff suppressed because it is too large
Load Diff
10248
src/glewinfo.c
Normal file
10248
src/glewinfo.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user