Browse Source

Updated FindCorrade.cmake from Corrade repository.

pull/7/head
Vladimír Vondruš 14 years ago
parent
commit
508200d99e
  1. 35
      modules/FindCorrade.cmake

35
modules/FindCorrade.cmake

@ -5,6 +5,8 @@
# This module tries to find Corrade library and then defines:
# CORRADE_FOUND - True if Corrade library is found
# CORRADE_INCLUDE_DIR - Include dir for Corrade
# CORRADE_INTERCONNECT_LIBRARIES - Corrade Interconnect library and
# dependent libraries
# CORRADE_UTILITY_LIBRARIES - Corrade Utility library and dependent
# libraries
# CORRADE_PLUGINMANAGER_LIBRARIES - Corrade Plugin manager library and
@ -23,39 +25,15 @@
#
#
# Add unit test using Corrade's TestSuite.
# corrade_add_test2(test_name
# sources...
# [LIBRARIES libraries...])
# corrade_add_test(test_name
# sources...
# [LIBRARIES libraries...])
# Test name is also executable name. You can also specify libraries to link
# with instead of using target_link_libraries(). CORRADE_TESTSUITE_LIBRARIES
# are linked atuomatically to each test. Note that the enable_testing()
# function must be called explicitly.
#
#
# Add QtTest unit test.
# corrade_add_test(test_name moc_header source_file
# [libraries...])
# These tests contain mainly from one source file and one header, which is
# processed by Qt meta-object compiler. The executable is then linked to QtCore
# and QtTest library, more libraries can be specified as another parameters.
# Test name is also executable name. Header file is processed with Qt's moc.
#
# Note: Before using this function you must find package Qt4. The
# enable_testing() function must be also called explicitly.
#
#
# Add QtTest unit test with multiple source files.
# corrade_add_multifile_test(test_name
# moc_header_variable
# source_files_variable)
# Useful when there is need to compile more than one cpp/h file into the test.
#
# Example usage:
# set(test_headers ComplexTest.h MyObject.h)
# set(test_sources ComplexTest.cpp MyObject.cpp)
# corrade_add_test(MyComplexTest test_headers test_sources
# CoreLibrary AnotherLibrary)
#
# Compile data resources into application binary.
# corrade_add_resource(name group_name
# file [ALIAS alias]
@ -107,6 +85,7 @@
#
# Libraries
find_library(CORRADE_INTERCONNECT_LIBRARY CorradeInterconnect)
find_library(CORRADE_UTILITY_LIBRARY CorradeUtility)
find_library(CORRADE_PLUGINMANAGER_LIBRARY CorradePluginManager)
find_library(CORRADE_TESTSUITE_LIBRARY CorradeTestSuite)
@ -122,6 +101,7 @@ find_path(CORRADE_INCLUDE_DIR
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Corrade DEFAULT_MSG
CORRADE_UTILITY_LIBRARY
CORRADE_INTERCONNECT_LIBRARY
CORRADE_PLUGINMANAGER_LIBRARY
CORRADE_TESTSUITE_LIBRARY
CORRADE_INCLUDE_DIR
@ -141,6 +121,7 @@ if(NOT _GCC46_COMPATIBILITY EQUAL -1)
endif()
set(CORRADE_UTILITY_LIBRARIES ${CORRADE_UTILITY_LIBRARY})
set(CORRADE_INTERCONNECT_LIBRARIES ${CORRADE_INTERCONNECT_LIBRARY} ${CORRADE_UTILITY_LIBRARIES})
set(CORRADE_PLUGINMANAGER_LIBRARIES ${CORRADE_PLUGINMANAGER_LIBRARY} ${CORRADE_UTILITY_LIBRARIES})
set(CORRADE_TESTSUITE_LIBRARIES ${CORRADE_TESTSUITE_LIBRARY} ${CORRADE_UTILITY_LIBRARIES})
mark_as_advanced(CORRADE_UTILITY_LIBRARY CORRADE_PLUGINMANAGER_LIBRARY CORRADE_TESTSUITE_LIBRARY)

Loading…
Cancel
Save