Browse Source

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.
vectorfields
Vladimír Vondruš 15 years ago
parent
commit
eaf7232943
  1. 4
      src/CMakeLists.txt
  2. 10
      src/Math/CMakeLists.txt

4
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})

10
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()

Loading…
Cancel
Save