diff options
author | Richard Bateman <taxilian@gmail.com> | 2010-10-07 02:43:04 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-01-11 17:54:44 (GMT) |
commit | 5457b8254cb43e002fe90b7c81ae65134ec12b24 (patch) | |
tree | 5eddb832a213487dd64cd8adb5c2ea88bb3d2baa /Tests/CFBundleTest/VerifyResult.cmake | |
parent | 6754b26bf0bb69ad6d65249bf4122dbbda446922 (diff) | |
download | CMake-5457b8254cb43e002fe90b7c81ae65134ec12b24.zip CMake-5457b8254cb43e002fe90b7c81ae65134ec12b24.tar.gz CMake-5457b8254cb43e002fe90b7c81ae65134ec12b24.tar.bz2 |
Add support for CFBundle targets on the Mac (#11295)
This commit enables building, for example, plugin bundles
to be loaded by web browsers.
Diffstat (limited to 'Tests/CFBundleTest/VerifyResult.cmake')
-rw-r--r-- | Tests/CFBundleTest/VerifyResult.cmake | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Tests/CFBundleTest/VerifyResult.cmake b/Tests/CFBundleTest/VerifyResult.cmake new file mode 100644 index 0000000..e622900 --- /dev/null +++ b/Tests/CFBundleTest/VerifyResult.cmake @@ -0,0 +1,32 @@ +if(NOT DEFINED CTEST_CONFIGURATION_TYPE) + message(FATAL_ERROR "expected variable CTEST_CONFIGURATION_TYPE not defined") +endif() + +if(NOT DEFINED dir) + message(FATAL_ERROR "expected variable dir not defined") +endif() + +if(NOT DEFINED gen) + message(FATAL_ERROR "expected variable gen not defined") +endif() + +message(STATUS "CTEST_CONFIGURATION_TYPE='${CTEST_CONFIGURATION_TYPE}'") +message(STATUS "dir='${dir}'") +message(STATUS "gen='${gen}'") + +if(gen MATCHES "Make" OR + "${CTEST_CONFIGURATION_TYPE}" STREQUAL "" OR + "${CTEST_CONFIGURATION_TYPE}" STREQUAL "." OR + "${CTEST_CONFIGURATION_TYPE}" STREQUAL "NoConfig") + set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") +else() + set(expected_filename "${dir}/${CTEST_CONFIGURATION_TYPE}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") +endif() + +if(NOT EXISTS "${expected_filename}") + message(FATAL_ERROR "test fails: expected output file does not exist [${expected_filename}]") +endif() + +file(COPY "${expected_filename}" + DESTINATION "${dir}/LatestBuildResult" + ) |