now only setting FREEGLUT_EXPORTS and FREEGLUT_STATIC for the shared and
static dll/lib respectively, instead of globally defining those for all targets That revealed the static build of the demos is broken, needed to add the FREEGLUT_STATIC definition there too Not including .def file on windows if 64 bit build. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1117 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
fe9b63c890
commit
d3496a2968
@ -33,15 +33,15 @@ SET(FREEGLUT_SRCS
|
|||||||
# Android port requires adding a version of these compatible with
|
# Android port requires adding a version of these compatible with
|
||||||
# OpenGL ES (TODO):
|
# OpenGL ES (TODO):
|
||||||
IF(NOT ANDROID)
|
IF(NOT ANDROID)
|
||||||
LIST(APPEND FREEGLUT_SRCS
|
LIST(APPEND FREEGLUT_SRCS
|
||||||
src/fg_font.c
|
src/fg_font.c
|
||||||
src/fg_geometry.c
|
src/fg_geometry.c
|
||||||
src/fg_menu.c
|
src/fg_menu.c
|
||||||
src/fg_teapot.c
|
src/fg_teapot.c
|
||||||
)
|
)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(WIN32) # TODO: is this true for 64 bit as well? Chaneg to WINDOWS?
|
IF(WIN32)
|
||||||
LIST(APPEND FREEGLUT_SRCS
|
LIST(APPEND FREEGLUT_SRCS
|
||||||
src/mswin/fg_cursor_mswin.c
|
src/mswin/fg_cursor_mswin.c
|
||||||
src/mswin/fg_display_mswin.c
|
src/mswin/fg_display_mswin.c
|
||||||
@ -209,11 +209,15 @@ ENDIF()
|
|||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
LIST(APPEND LIBS winmm)
|
LIST(APPEND LIBS winmm)
|
||||||
IF(BUILD_SHARED_LIBS)
|
IF(BUILD_SHARED_LIBS)
|
||||||
LIST(APPEND FREEGLUT_SRCS src/Common/freeglutdll.def freeglut.rc)
|
LIST(APPEND FREEGLUT_SRCS freeglut.rc)
|
||||||
# XXX I assume that if we want both shared and static this one is appropriate
|
IF (NOT CMAKE_CL_64)
|
||||||
ADD_DEFINITIONS(-DFREEGLUT_EXPORTS)
|
# .def file only for 32bit Windows builds
|
||||||
ELSE()
|
LIST(APPEND FREEGLUT_SRCS src/Common/freeglutdll.def)
|
||||||
ADD_DEFINITIONS(-DFREEGLUT_STATIC)
|
ENDIF()
|
||||||
|
SET_TARGET_PROPERTIES(freeglut PROPERTIES COMPILE_FLAGS -DFREEGLUT_EXPORTS)
|
||||||
|
ENDIF()
|
||||||
|
IF(BUILD_STATIC_LIBS)
|
||||||
|
SET_TARGET_PROPERTIES(freeglut_static PROPERTIES COMPILE_FLAGS -DFREEGLUT_STATIC)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSE()
|
ELSE()
|
||||||
# on UNIX we need to make sure:
|
# on UNIX we need to make sure:
|
||||||
@ -276,6 +280,7 @@ MACRO(ADD_DEMO name)
|
|||||||
IF(BUILD_STATIC_LIBS)
|
IF(BUILD_STATIC_LIBS)
|
||||||
ADD_EXECUTABLE(${name}_static ${ARGN})
|
ADD_EXECUTABLE(${name}_static ${ARGN})
|
||||||
TARGET_LINK_LIBRARIES(${name}_static ${DEMO_LIBS} freeglut_static)
|
TARGET_LINK_LIBRARIES(${name}_static ${DEMO_LIBS} freeglut_static)
|
||||||
|
SET_TARGET_PROPERTIES(${name}_static PROPERTIES COMPILE_FLAGS -DFREEGLUT_STATIC)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
Reference in New Issue
Block a user