Commit d1dac1ac authored by Gregor Jasny's avatar Gregor Jasny
Browse files

Xcode: Execute RunCMake.Framework also for Xcode generator

parent d02709d7
cmake_minimum_required(VERSION 3.4)
enable_language(C)
set(CMAKE_CONFIGURATION_TYPES "Debug" CACHE INTERNAL "Supported configuration types")
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}) # get rid of ${EFFECTIVE_PLATFORM_NAME}
add_library(Framework ${FRAMEWORK_TYPE}
foo.c
foo.h
......@@ -18,3 +21,5 @@ set_source_files_properties(some.txt PROPERTIES MACOSX_PACKAGE_LOCATION somedir)
add_custom_command(TARGET Framework POST_BUILD
COMMAND /usr/bin/file $<TARGET_FILE:Framework>)
file(GENERATE OUTPUT FrameworkName.cmake CONTENT "set(framework-dir \"$<TARGET_BUNDLE_DIR:Framework>\")\n")
set(framework-dir "${RunCMake_TEST_BINARY_DIR}/Framework.framework")
include("${RunCMake_TEST_BINARY_DIR}/FrameworkName.cmake")
set(framework-resources "${framework-dir}/Resources")
set(framework-resource-file "${framework-resources}/res.txt")
set(framework-flat-resource-file "${framework-resources}/flatresource.txt")
......
......@@ -13,13 +13,10 @@ function(framework_layout_test Name Toolchain Type)
run_cmake_command(${Name} ${CMAKE_COMMAND} --build .)
endfunction()
# build check cannot cope with multi-configuration generators directory layout
if(NOT RunCMake_GENERATOR STREQUAL "Xcode")
framework_layout_test(iOSFrameworkLayout-build ios SHARED)
framework_layout_test(iOSFrameworkLayout-build ios STATIC)
framework_layout_test(OSXFrameworkLayout-build osx SHARED)
framework_layout_test(OSXFrameworkLayout-build osx STATIC)
endif()
framework_layout_test(iOSFrameworkLayout-build ios SHARED)
framework_layout_test(iOSFrameworkLayout-build ios STATIC)
framework_layout_test(OSXFrameworkLayout-build osx SHARED)
framework_layout_test(OSXFrameworkLayout-build osx STATIC)
function(framework_type_test Toolchain Type)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${Toolchain}${Type}FrameworkType-build)
......
set(framework-dir "${RunCMake_TEST_BINARY_DIR}/Framework.framework")
include("${RunCMake_TEST_BINARY_DIR}/FrameworkName.cmake")
set(framework-resources "${framework-dir}/Resources")
set(framework-resource-file "${framework-dir}/res.txt")
set(framework-flat-resource-file "${framework-dir}/flatresource.txt")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment