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
9548431b
Commit
9548431b
authored
Feb 15, 2016
by
Wes Tarro
Browse files
Moved DLL entry-point for GCC into glew.c rather than a standalone file
included using CMake.
parent
02fc17f5
Changes
3
Hide whitespace changes
Inline
Side-by-side
auto/src/glew_init_tail.c
View file @
9548431b
...
@@ -53,3 +53,12 @@ GLenum GLEWAPIENTRY glewInit (void)
...
@@ -53,3 +53,12 @@ GLenum GLEWAPIENTRY glewInit (void)
return
r
;
return
r
;
#endif
/* _WIN32 */
#endif
/* _WIN32 */
}
}
#if defined(_WIN32) && defined(GLEW_BUILD) && defined(__GNUC__)
/* GCC requires a DLL entry point even without any standard library included. */
/* Types extracted from windows.h to avoid polluting the rest of the file. */
int
__stdcall
DllMainCRTStartup
(
void
*
instance
,
unsigned
reason
,
void
*
reserved
)
{
return
1
;
}
#endif
build/cmake/CMakeLists.txt
View file @
9548431b
...
@@ -78,10 +78,6 @@ set (GLEW_SRC_FILES ${GLEW_DIR}/src/glew.c)
...
@@ -78,10 +78,6 @@ set (GLEW_SRC_FILES ${GLEW_DIR}/src/glew.c)
if
(
WIN32
)
if
(
WIN32
)
list
(
APPEND GLEW_SRC_FILES
${
GLEW_DIR
}
/build/glew.rc
)
list
(
APPEND GLEW_SRC_FILES
${
GLEW_DIR
}
/build/glew.rc
)
if
((
CMAKE_C_COMPILER_ID MATCHES
"GNU"
)
OR
(
CMAKE_C_COMPILER_ID MATCHES
"Clang"
))
# GCC can't handle not having a DLL entry point, so give it a fake one
list
(
APPEND GLEW_SRC_FILES
${
GLEW_DIR
}
/src/gcc_dll_entry.c
)
endif
()
endif
()
endif
()
add_library
(
glew SHARED
${
GLEW_SRC_FILES
}
)
add_library
(
glew SHARED
${
GLEW_SRC_FILES
}
)
...
...
src/gcc_dll_entry.c
deleted
100644 → 0
View file @
02fc17f5
#ifdef GLEW_BUILD
#include <windows.h>
BOOL
WINAPI
DllMainCRTStartup
(
HINSTANCE
instance
,
DWORD
reason
,
LPVOID
reserved
)
{
return
TRUE
;
}
#endif
\ No newline at end of file
Write
Preview
Supports
Markdown
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