@ -52,27 +52,26 @@ set(MagnumMeshTools_HEADERS
v i s i b i l i t y . h )
v i s i b i l i t y . h )
# 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
# O b j e c t s s h a r e d b e t w e e n m a i n a n d t e s t l i b r a r y
# 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 ( MagnumMeshToolsObjects OBJECT
add_library ( MagnumMeshToolsObjects OBJECT
$ { M a g n u m M e s h T o o l s _ S R C S }
$ { M a g n u m M e s h T o o l s _ S R C S }
$ { M a g n u m M e s h T o o l s _ H E A D E R S } )
$ { M a g n u m M e s h T o o l s _ H E A D E R S } )
if ( NOT BUILD_SHARED OR BUILD_STATIC_PIC )
if ( NOT BUILD_STATIC )
# 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 ( MagnumMeshToolsObjects PROPERTIES COMPILE_FLAGS "-DMagnumMeshToolsObjects_EXPORTS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}" )
else ( )
set_target_properties ( MagnumMeshToolsObjects PROPERTIES COMPILE_FLAGS "-DMagnumMeshToolsObjects_EXPORTS" )
set_target_properties ( MagnumMeshToolsObjects PROPERTIES COMPILE_FLAGS "-DMagnumMeshToolsObjects_EXPORTS" )
endif ( )
endif ( )
if ( NOT BUILD_STATIC OR BUILD_STATIC_PIC )
set_target_properties ( MagnumMeshToolsObjects PROPERTIES POSITION_INDEPENDENT_CODE ON )
endif ( )
# M a i n l i b r a r y
# M a i n M e s h T o o l s l i b r a r y
add_library ( MagnumMeshTools ${ SHARED_OR_STATIC }
add_library ( MagnumMeshTools ${ SHARED_OR_STATIC }
$ < T A R G E T _ O B J E C T S : M a g n u m M e s h T o o l s 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 e s h T o o l s O b j e c t s >
$ { M a g n u m M e s h T o o l s _ G r a c e f u l A s s e r t _ S R C S } )
$ { M a g n u m M e s h T o o l s _ G r a c e f u l A s s e r t _ S R C S } )
set_target_properties ( MagnumMeshTools PROPERTIES DEBUG_POSTFIX "-d" )
set_target_properties ( MagnumMeshTools PROPERTIES DEBUG_POSTFIX "-d" )
if ( BUILD_STATIC_PIC )
if ( BUILD_STATIC_PIC )
# 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 ( MagnumMeshTools PROPERTIES POSITION_INDEPENDENT_CODE ON )
set_target_properties ( MagnumMeshTools PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}" )
endif ( )
endif ( )
target_link_libraries ( MagnumMeshTools Magnum )
target_link_libraries ( MagnumMeshTools Magnum )
install ( TARGETS MagnumMeshTools
install ( TARGETS MagnumMeshTools
@ -89,6 +88,10 @@ if(BUILD_TESTS)
set_target_properties ( MagnumMeshToolsTestLib PROPERTIES
set_target_properties ( MagnumMeshToolsTestLib PROPERTIES
C O M P I L E _ F L A G S " - D C O R R A D E _ G R A C E F U L _ A S S E R T - D M a g n u m M e s h T o o l s _ E X P O R T S "
C O M P I L E _ F L A G S " - D C O R R A D E _ G R A C E F U L _ A S S E R T - D M a g n u m M e s h T o o l s _ E X P O R T S "
D E B U G _ P O S T F I X " - d " )
D E B U G _ P O S T F I X " - d " )
if ( BUILD_STATIC_PIC )
set_target_properties ( MagnumMeshToolsTestLib PROPERTIES POSITION_INDEPENDENT_CODE ON )
endif ( )
target_link_libraries ( MagnumMeshToolsTestLib Magnum )
target_link_libraries ( MagnumMeshToolsTestLib Magnum )
# 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
# 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