Merge topic 'osx-cfbundle-tweaks'
b189c599
Tests: Run CFBundleTest only with valid configuration3a605693
Xcode: Call IsCFBundleOnApple to decide if bundle is being built207b7af0
cmTarget: Use GetCFBundleDirectory within GetFullNameInternal
This commit is contained in:
commit
ccd5822a83
|
@ -1925,7 +1925,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
||||||
{
|
{
|
||||||
buildSettings->AddAttribute("LIBRARY_STYLE",
|
buildSettings->AddAttribute("LIBRARY_STYLE",
|
||||||
this->CreateString("BUNDLE"));
|
this->CreateString("BUNDLE"));
|
||||||
if (target.GetPropertyAsBool("BUNDLE"))
|
if (target.IsCFBundleOnApple())
|
||||||
{
|
{
|
||||||
// It turns out that a BUNDLE is basically the same
|
// It turns out that a BUNDLE is basically the same
|
||||||
// in many ways as an application bundle, as far as
|
// in many ways as an application bundle, as far as
|
||||||
|
|
|
@ -4057,15 +4057,8 @@ void cmTarget::GetFullNameInternal(const std::string& config,
|
||||||
|
|
||||||
if(this->IsCFBundleOnApple())
|
if(this->IsCFBundleOnApple())
|
||||||
{
|
{
|
||||||
fw_prefix = this->GetOutputName(config, false);
|
fw_prefix = this->GetCFBundleDirectory(config, false);
|
||||||
fw_prefix += ".";
|
fw_prefix += "/";
|
||||||
const char *ext = this->GetProperty("BUNDLE_EXTENSION");
|
|
||||||
if (!ext)
|
|
||||||
{
|
|
||||||
ext = "bundle";
|
|
||||||
}
|
|
||||||
fw_prefix += ext;
|
|
||||||
fw_prefix += "/Contents/MacOS/";
|
|
||||||
targetPrefix = fw_prefix.c_str();
|
targetPrefix = fw_prefix.c_str();
|
||||||
targetSuffix = 0;
|
targetSuffix = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,13 +14,10 @@ message(STATUS "CTEST_CONFIGURATION_TYPE='${CTEST_CONFIGURATION_TYPE}'")
|
||||||
message(STATUS "dir='${dir}'")
|
message(STATUS "dir='${dir}'")
|
||||||
message(STATUS "gen='${gen}'")
|
message(STATUS "gen='${gen}'")
|
||||||
|
|
||||||
if(gen MATCHES "Make" OR
|
if(gen STREQUAL "Xcode")
|
||||||
"${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")
|
set(expected_filename "${dir}/${CTEST_CONFIGURATION_TYPE}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest")
|
||||||
|
else()
|
||||||
|
set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT EXISTS "${expected_filename}")
|
if(NOT EXISTS "${expected_filename}")
|
||||||
|
|
|
@ -1931,16 +1931,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
|
||||||
${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe)
|
${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe)
|
||||||
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest")
|
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest")
|
||||||
|
|
||||||
add_test(CFBundleTest ${CMAKE_CTEST_COMMAND}
|
add_test(NAME CFBundleTest COMMAND ${CMAKE_CTEST_COMMAND}
|
||||||
--build-and-test
|
--build-and-test
|
||||||
"${CMake_SOURCE_DIR}/Tests/CFBundleTest"
|
"${CMake_SOURCE_DIR}/Tests/CFBundleTest"
|
||||||
"${CMake_BINARY_DIR}/Tests/CFBundleTest"
|
"${CMake_BINARY_DIR}/Tests/CFBundleTest"
|
||||||
--build-two-config
|
--build-two-config
|
||||||
${build_generator_args}
|
${build_generator_args}
|
||||||
--build-project CFBundleTest
|
--build-project CFBundleTest
|
||||||
|
--build-config $<CONFIGURATION>
|
||||||
--build-options ${build_options}
|
--build-options ${build_options}
|
||||||
--test-command
|
--test-command
|
||||||
${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=\${CTEST_CONFIGURATION_TYPE}
|
${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=$<CONFIGURATION>
|
||||||
-Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest
|
-Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest
|
||||||
-Dgen=${CMAKE_GENERATOR}
|
-Dgen=${CMAKE_GENERATOR}
|
||||||
-P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake)
|
-P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake)
|
||||||
|
|
Loading…
Reference in New Issue