@ -1,14 +1,9 @@
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wold-style-cast -Winit-self -Werror=return-type -Wmissing-declarations -pedantic -std=c++0x -fvisibility=hidden" )
if ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdouble-promotion" )
endif ( )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CORRADE_CXX_FLAGS}" )
include_directories ( ${ CMAKE_CURRENT_SOURCE_DIR } ${ CMAKE_CURRENT_BINARY_DIR } ${ CORRADE_INCLUDE_DIR } )
configure_file ( ${ CMAKE_CURRENT_SOURCE_DIR } /magnumConfigure.h.cmake
$ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / m a g n u m C o n f i g u r e . h )
include_directories ( ${ CMAKE_CURRENT_SOURCE_DIR } ${ CMAKE_CURRENT_BINARY_DIR } ${ CORRADE_INCLUDE_DIR } )
# F i l e s s h a r e d b e t w e e n m a i n l i b r a r y a n d u n i t t e s t l i b r a r y
set ( Magnum_SRCS
A b s t r a c t F r a m e b u f f e r . c p p
@ -97,8 +92,6 @@ if(NOT TARGET_GLES2)
B u f f e r I m a g e . h )
endif ( )
add_library ( MagnumObjects OBJECT ${ Magnum_SRCS } )
# F i l e s s h a r e d b e t w e e n m a i n l i b r a r y a n d m a t h u n i t t e s t l i b r a r y
set ( MagnumMath_SRCS
M a t h / A n g l e . c p p
@ -109,10 +102,11 @@ set(MagnumMath_SRCS
M a t h / Q u a t e r n i o n . c p p
M a t h / R e c t a n g u l a r M a t r i x . c p p
M a t h / V e c t o r . c p p )
add_library ( MagnumMathObjects OBJECT ${ MagnumMath_SRCS } )
# 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 ( MagnumObjects MagnumMathObjects PROPERTIES COMPILE_FLAGS "-DMagnumObjects_EXPORTS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}" )
# M a i n l i b r a r y
@ -134,12 +128,10 @@ target_link_libraries(Magnum ${Magnum_LIBS})
install ( TARGETS Magnum DESTINATION ${ MAGNUM_LIBRARY_INSTALL_DIR } )
install ( FILES ${ Magnum_HEADERS } DESTINATION ${ MAGNUM_INCLUDE_INSTALL_DIR } )
# I n s t a l l a l s o c o n f i g u r e f i l e
install ( FILES ${ CMAKE_CURRENT_BINARY_DIR } /magnumConfigure.h DESTINATION ${ MAGNUM_INCLUDE_INSTALL_DIR } )
add_subdirectory ( Platform )
add_subdirectory ( Math )
add_subdirectory ( Platform )
add_subdirectory ( Trade )
if ( WITH_DEBUGTOOLS )
@ -175,9 +167,7 @@ if(WITH_TEXTURETOOLS)
endif ( )
if ( BUILD_TESTS )
enable_testing ( )
# L i b r a r y w i t h g r a c e f u l a s s e r t f o r t e s t i n g
# L i b r a r i e s w i t h g r a c e f u l a s s e r t f o r t e s t i n g
add_library ( MagnumMathTestLib SHARED
$ < 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 ( MagnumMathTestLib PROPERTIES COMPILE_FLAGS -DCORRADE_GRACEFUL_ASSERT )