From eaf7232943645e9d082a3b926cd6cc08d020ecd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 9 Dec 2011 16:35:30 +0100 Subject: [PATCH] Don't compile Math as static library, as unused symbols are discarded. Currently the files are compiled directly into Magnum library, static library is used only for testing purposes. --- src/CMakeLists.txt | 4 +++- src/Math/CMakeLists.txt | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6c0d7bbf9..b1da2a18e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,10 +19,12 @@ set(Magnum_SRCS Shader.cpp SizeTraits.cpp Texture.cpp + + Math/Math.cpp ) add_library(Magnum SHARED ${Magnum_SRCS}) -target_link_libraries(Magnum CorradePluginManager CorradeUtility MagnumMath ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARY}) +target_link_libraries(Magnum CorradePluginManager CorradeUtility ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARY}) install(TARGETS Magnum DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) diff --git a/src/Math/CMakeLists.txt b/src/Math/CMakeLists.txt index 1ce5fe56a..2dcb5d6a3 100644 --- a/src/Math/CMakeLists.txt +++ b/src/Math/CMakeLists.txt @@ -1,10 +1,12 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -add_library(MagnumMath STATIC - Math.cpp -) - if(BUILD_TESTS) + + # Add Math library for testing purposes + add_library(MagnumMath STATIC + Math.cpp + ) + enable_testing() add_subdirectory(Test) endif()