Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
third-party
glew
Commits
4fcd4688
Commit
4fcd4688
authored
Feb 19, 2015
by
Nigel Stewart
Browse files
[cmake] Move cmake build into build/cmake to avoid collision with established GNUmake build system.
parent
40513e0b
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitattributes
View file @
4fcd4688
* text eol=lf
*.png binary
build/*/* text eol=crlf
* text eol=lf
*.png binary
build/*/* text eol=crlf
CMakeLists.txt text eol=lf
.gitignore
View file @
4fcd4688
...
...
@@ -6,6 +6,10 @@
/build/*/*.suo
/build/*/*.vcxproj.user
/build/*/tmp/
/build/cmake/CMakeFiles/
/build/cmake/CMakeCache.txt
/build/cmake/cmake_install.cmake
/build/cmake/Makefile
/auto/extensions
/auto/registry
/bin
...
...
CMakeLists.txt
→
build/cmake/
CMakeLists.txt
View file @
4fcd4688
...
...
@@ -14,6 +14,8 @@ option (BUILD_UTILS "utilities" ON)
set
(
GLEW_VERSION
"1.12.0"
)
set
(
GLEW_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/../..
)
set
(
CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/lib
)
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/lib
)
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/bin
)
...
...
@@ -30,10 +32,10 @@ set (GLEW_LIBRARIES ${OPENGL_LIBRARIES})
add_definitions
(
-DGLEW_BUILD -DGLEW_NO_GLU
)
include_directories
(
${
PROJECT_SOURCE
_DIR
}
/include
)
include_directories
(
${
GLEW
_DIR
}
/include
)
add_library
(
glew SHARED src/glew.c
)
add_library
(
glew_s STATIC src/glew.c
)
add_library
(
glew SHARED
${
GLEW_DIR
}
/
src/glew.c
)
add_library
(
glew_s STATIC
${
GLEW_DIR
}
/
src/glew.c
)
target_link_libraries
(
glew
${
GLEW_LIBRARIES
}
)
target_link_libraries
(
glew_s
${
GLEW_LIBRARIES
}
)
set_target_properties
(
glew PROPERTIES OUTPUT_NAME
${
GLEW_LIB_NAME
}
)
...
...
@@ -41,8 +43,8 @@ set_target_properties (glew_s PROPERTIES OUTPUT_NAME ${GLEW_LIB_NAME})
set_target_properties
(
glew PROPERTIES PREFIX
"
${
DLL_PREFIX
}
"
)
set_target_properties
(
glew_s PROPERTIES PREFIX lib
)
add_library
(
glewmx SHARED src/glew.c
)
add_library
(
glewmx_s STATIC src/glew.c
)
add_library
(
glewmx SHARED
${
GLEW_DIR
}
/
src/glew.c
)
add_library
(
glewmx_s STATIC
${
GLEW_DIR
}
/
src/glew.c
)
target_link_libraries
(
glewmx
${
GLEW_LIBRARIES
}
)
target_link_libraries
(
glewmx_s
${
GLEW_LIBRARIES
}
)
set_target_properties
(
glewmx PROPERTIES COMPILE_FLAGS
"-DGLEW_MX"
OUTPUT_NAME
${
GLEW_LIB_NAME
}
mx
)
...
...
@@ -57,10 +59,10 @@ install ( TARGETS glew glew_s glewmx glewmx_s
)
if
(
BUILD_UTILS
)
add_executable
(
glewinfo src/glewinfo.c
)
add_executable
(
glewinfo
${
GLEW_DIR
}
/
src/glewinfo.c
)
target_link_libraries
(
glewinfo glew
)
add_executable
(
visualinfo src/visualinfo.c
)
add_executable
(
visualinfo
${
GLEW_DIR
}
/
src/visualinfo.c
)
target_link_libraries
(
visualinfo glew
)
install
(
TARGETS glewinfo visualinfo
...
...
@@ -76,11 +78,11 @@ set (version ${GLEW_VERSION})
set
(
libname
${
GLEW_LIB_NAME
}
)
set
(
cflags
)
set
(
requireslib glu
)
configure_file
(
glew.pc.in
${
CMAKE_BINARY
_DIR
}
/glew.pc @ONLY
)
configure_file
(
${
GLEW_DIR
}
/
glew.pc.in
${
GLEW
_DIR
}
/glew.pc @ONLY
)
set
(
cflags
"-DGLEW_MX"
)
set
(
libname
${
GLEW_LIB_NAME
}
mx
)
configure_file
(
glew.pc.in
${
CMAKE_BINARY
_DIR
}
/glewmx.pc @ONLY
)
configure_file
(
${
GLEW_DIR
}
/
glew.pc.in
${
GLEW
_DIR
}
/glewmx.pc @ONLY
)
install
(
FILES
${
CMAKE_BINARY
_DIR
}
/glew.pc
${
CMAKE_BINARY
_DIR
}
/glewmx.pc
install
(
FILES
${
GLEW
_DIR
}
/glew.pc
${
GLEW
_DIR
}
/glewmx.pc
DESTINATION lib/pkgconfig
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment