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
@ -41,7 +41,7 @@ IF(NOT ANDROID)
|
|||||||
)
|
)
|
||||||
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