Browse Source

Platform: specify dependencies for Application libs on single place.

pull/68/head
Vladimír Vondruš 12 years ago
parent
commit
746b4eb692
  1. 3
      CMakeLists.txt
  2. 8
      src/Magnum/Platform/CMakeLists.txt
  3. 6
      src/Magnum/Text/CMakeLists.txt
  4. 6
      src/Magnum/TextureTools/CMakeLists.txt

3
CMakeLists.txt

@ -168,8 +168,7 @@ endif()
if(BUILD_GL_TESTS)
if(UNIX AND (NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES))
set(WITH_WINDOWLESSGLXAPPLICATION ON)
find_package(X11 REQUIRED)
set(GL_TEST_LIBRARIES Magnum MagnumWindowlessGlxApplication ${X11_LIBRARIES})
set(GL_TEST_LIBRARIES Magnum MagnumWindowlessGlxApplication)
else()
message(FATAL_ERROR "Cannot run tests for OpenGL code on this platform. Set BUILD_GL_TESTS to OFF to skip building them.")
endif()

8
src/Magnum/Platform/CMakeLists.txt

@ -108,6 +108,7 @@ if(WITH_WINDOWLESSNACLAPPLICATION)
add_library(MagnumWindowlessNaClApplication STATIC WindowlessNaClApplication.cpp)
set_target_properties(MagnumWindowlessNaClApplication PROPERTIES DEBUG_POSTFIX "-d")
target_link_libraries(MagnumWindowlessNaClApplication Magnum ppapi_cpp ppapi)
install(FILES WindowlessNaClApplication.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Platform)
install(TARGETS MagnumWindowlessNaClApplication
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
@ -171,6 +172,7 @@ if(WITH_WINDOWLESSGLXAPPLICATION)
set_target_properties(MagnumWindowlessGlxApplication PROPERTIES
COMPILE_FLAGS "-Wno-old-style-cast"
DEBUG_POSTFIX "-d")
target_link_libraries(MagnumWindowlessGlxApplication Magnum ${X11_LIBRARIES})
install(FILES WindowlessGlxApplication.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Platform)
install(TARGETS MagnumWindowlessGlxApplication
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
@ -184,6 +186,7 @@ if(WITH_WINDOWLESSWGLAPPLICATION)
set_target_properties(MagnumWindowlessWglApplication PROPERTIES
COMPILE_FLAGS "-DUNICODE"
DEBUG_POSTFIX "-d")
target_link_libraries(MagnumWindowlessWglApplication Magnum)
install(FILES WindowlessWglApplication.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Platform)
install(TARGETS MagnumWindowlessWglApplication
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
@ -194,6 +197,7 @@ endif()
# Windowless CGL application
if(WITH_WINDOWLESSCGLAPPLICATION)
add_library(MagnumWindowlessCglApplication STATIC WindowlessCglApplication.cpp)
target_link_libraries(MagnumWindowlessCglApplication Magnum)
install(FILES WindowlessCglApplication.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Platform)
install(TARGETS MagnumWindowlessCglApplication
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
@ -235,9 +239,9 @@ if(WITH_MAGNUMINFO)
if(CORRADE_TARGET_APPLE)
target_link_libraries(magnum-info MagnumWindowlessCglApplication)
elseif(CORRADE_TARGET_NACL)
target_link_libraries(magnum-info MagnumWindowlessNaClApplication ppapi_cpp ppapi)
target_link_libraries(magnum-info MagnumWindowlessNaClApplication)
elseif(CORRADE_TARGET_UNIX)
target_link_libraries(magnum-info MagnumWindowlessGlxApplication ${X11_LIBRARIES})
target_link_libraries(magnum-info MagnumWindowlessGlxApplication)
elseif(CORRADE_TARGET_WINDOWS)
target_link_libraries(magnum-info MagnumWindowlessWglApplication)
else()

6
src/Magnum/Text/CMakeLists.txt

@ -68,11 +68,11 @@ if(WITH_FONTCONVERTER)
add_executable(magnum-fontconverter fontconverter.cpp)
if(CORRADE_TARGET_APPLE)
target_link_libraries(magnum-fontconverter MagnumText Magnum MagnumWindowlessCglApplication)
target_link_libraries(magnum-fontconverter MagnumText MagnumWindowlessCglApplication)
elseif(CORRADE_TARGET_UNIX AND NOT TARGET_GLES)
target_link_libraries(magnum-fontconverter MagnumText Magnum MagnumWindowlessGlxApplication ${X11_LIBRARIES})
target_link_libraries(magnum-fontconverter MagnumText MagnumWindowlessGlxApplication)
elseif(CORRADE_TARGET_WINDOWS)
target_link_libraries(magnum-fontconverter MagnumText Magnum MagnumWindowlessWglApplication)
target_link_libraries(magnum-fontconverter MagnumText MagnumWindowlessWglApplication)
else()
message(FATAL_ERROR "magnum-fontconverter is not available on this platform. Set WITH_FONTCONVERTER to OFF to suppress this warning.")
endif()

6
src/Magnum/TextureTools/CMakeLists.txt

@ -57,11 +57,11 @@ if(WITH_DISTANCEFIELDCONVERTER)
add_executable(magnum-distancefieldconverter distancefieldconverter.cpp)
if(CORRADE_TARGET_APPLE)
target_link_libraries(magnum-distancefieldconverter MagnumTextureTools MagnumWindowlessCglApplication Magnum)
target_link_libraries(magnum-distancefieldconverter MagnumTextureTools MagnumWindowlessCglApplication)
elseif(CORRADE_TARGET_UNIX AND NOT TARGET_GLES)
target_link_libraries(magnum-distancefieldconverter MagnumTextureTools Magnum MagnumWindowlessGlxApplication ${X11_LIBRARIES})
target_link_libraries(magnum-distancefieldconverter MagnumTextureTools Magnum MagnumWindowlessGlxApplication)
elseif(CORRADE_TARGET_WINDOWS)
target_link_libraries(magnum-distancefieldconverter MagnumTextureTools MagnumWindowlessWglApplication Magnum)
target_link_libraries(magnum-distancefieldconverter MagnumTextureTools MagnumWindowlessWglApplication)
else()
message(FATAL_ERROR "magnum-distancefieldconverter is not available on this platform. Set WITH_DISTANCEFIELDCONVERTER to OFF to suppress this warning.")
endif()

Loading…
Cancel
Save