summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake
blob: a1064f45dcfe2314ebdd9ae1b936fa0c47624432 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
cmake_minimum_required(VERSION 3.3)
enable_language(CXX)

set_property(GLOBAL PROPERTY XCODE_EMIT_EFFECTIVE_PLATFORM_NAME ON)

set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx iphonesimulator")
set(CMAKE_MACOSX_BUNDLE true)

add_library(library STATIC foo.cpp)

add_executable(main main.cpp)
target_link_libraries(main library)

install(TARGETS library ARCHIVE DESTINATION lib)