@ -94,7 +94,6 @@ set(Magnum_SRCS
T r a d e / P h o n g M a t e r i a l D a t a . c p p
T r a d e / S c e n e D a t a . c p p
T r a d e / T e x t u r e D a t a . c p p )
set ( Magnum_OBJECTS $< TARGET_OBJECTS:MagnumObjects > )
# D e s k t o p - o n l y c o d e
if ( NOT TARGET_GLES )
@ -161,7 +160,7 @@ if(NOT TARGET_GLES)
set ( Magnum_HEADERS ${ Magnum_HEADERS }
B u f f e r T e x t u r e . h
C u b e M a p T e x t u r e A r r a y . h )
set ( Magnum_OBJECTS ${ Magnum_OBJECT S } $< TARGET_OBJECTS:MagnumGLLoadGenObjects > )
set ( Magnum_SRCS ${ Magnum_SRC S } $< TARGET_OBJECTS:MagnumGLLoadGenObjects > )
endif ( )
# N o t - E S 2 h e a d e r s
@ -175,21 +174,23 @@ set(MagnumMath_SRCS
M a t h / F u n c t i o n s . c p p
M a t h / i n s t a n t i a t i o n . c p p )
# S e t s h a r e d l i b r a r y f l a g s f o r t h e o b j e c t s , a s t h e y w i l l b e p a r t o f s h a r e d l i b
# T O D O : f i x w h e n C M a k e s e t s t a r g e t _ E X P O R T S f o r O B J E C T t a r g e t s a s w e l l
add_library ( MagnumMathObjects OBJECT ${ MagnumMath_SRCS } )
add_library ( MagnumObjects OBJECT ${ Magnum_SRCS } )
set_target_properties ( MagnumMathObjects PROPERTIES COMPILE_FLAGS "-DMagnumMathObjects_EXPORTS -DGLLoadGen_EXPORTS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}" )
set_target_properties ( MagnumObjects PROPERTIES COMPILE_FLAGS "-DMagnumObjects_EXPORTS -DGLLoadGen_EXPORTS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}" )
# M a i n l i b r a r y
add_library ( MagnumMathObjects OBJECT ${ MagnumMath_SRCS } )
add_library ( Magnum ${ SHARED_OR_STATIC }
$ { M a g n u m _ O B J E C T S }
$ { M a g n u m _ S R C S }
$ < T A R G E T _ O B J E C T S : M a g n u m M a t h O b j e c t s > )
if ( BUILD_STATIC_PIC )
# T O D O : f i x w h e n C M a k e s e t s t a r g e t _ E X P O R T S f o r O B J E C T t a r g e t s a s w e l l
if ( NOT BUILD_STATIC OR BUILD_STATIC_PIC )
# S e t s h a r e d l i b r a r y f l a g s f o r t h e o b j e c t s , a s t h e y w i l l b e p a r t o f s h a r e d l i b
# T O D O : C M a k e 2 . 8 . 9 h a s t h i s a s P O S I T I O N _ I N D E P E N D E N T _ C O D E p r o p e r t y
set_target_properties ( Magnum PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}" )
set_target_properties ( MagnumMathObjects PROPERTIES COMPILE_FLAGS "-DMagnumMathObjects_EXPORTS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}" )
set_target_properties ( Magnum PROPERTIES COMPILE_FLAGS "-DGLLoadGen_EXPORTS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}" )
else ( )
set_target_properties ( MagnumMathObjects PROPERTIES COMPILE_FLAGS "-DMagnumMathObjects_EXPORTS" )
set_target_properties ( Magnum PROPERTIES COMPILE_FLAGS "-DGLLoadGen_EXPORTS" )
endif ( )
set ( Magnum_LIBS
$ { C O R R A D E _ U T I L I T Y _ L I B R A R I E S }
$ { C O R R A D E _ P L U G I N M A N A G E R _ L I B R A R I E S } )
@ -257,16 +258,10 @@ if(BUILD_TESTS)
set_target_properties ( MagnumMathTestLib PROPERTIES COMPILE_FLAGS -DCORRADE_GRACEFUL_ASSERT )
target_link_libraries ( MagnumMathTestLib ${ CORRADE_UTILITY_LIBRARY } )
add_library ( MagnumTestLib ${ SHARED_OR_STATIC }
$ { M a g n u m _ O B J E C T S }
$ < T A R G E T _ O B J E C T S : M a g n u m M a t h O b j e c t s > )
set_target_properties ( MagnumTestLib PROPERTIES COMPILE_FLAGS -DCORRADE_GRACEFUL_ASSERT )
target_link_libraries ( MagnumTestLib ${ Magnum_LIBS } )
# O n W i n d o w s w e n e e d t o i n s t a l l f i r s t a n d t h e n r u n t h e t e s t s t o a v o i d " D L L
# n o t f o u n d " h e l l , t h u s w e n e e d t o i n s t a l l t h i s t o o
if ( WIN32 AND NOT CMAKE_CROSSCOMPILING )
install ( TARGETS MagnumMathTestLib MagnumTestLib
install ( TARGETS MagnumMathTestLib
R U N T I M E D E S T I N A T I O N $ { M A G N U M _ B I N A R Y _ I N S T A L L _ D I R }
L I B R A R Y D E S T I N A T I O N $ { M A G N U M _ L I B R A R Y _ I N S T A L L _ D I R }
A R C H I V E D E S T I N A T I O N $ { M A G N U M _ L I B R A R Y _ I N S T A L L _ D I R } )