[tvOS] try_compile() failed with "Code Signing Error: No profiles for 'com.test' were found"
Hi, I am trying to generate the Xcode project of a simple helloworld.cpp but if any module uses try_compile()
I get a Code Signing Error: Bundle identifier is missing
error.
Command:
cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=../Toolchain.cmake ..
CMakeLists.txt:
cmake_minimum_required(VERSION 3.14)
project (hello LANGUAGES CXX)
# This module uses 'try_compile()' at some time
find_package(Threads REQUIRED)
add_executable(hello helloworld.cpp)
Toolchain.cmake:
set(CMAKE_SYSTEM_NAME tvOS)
CMakeError.log:
Determining if the include file pthread.h exists failed with the following output:
Change Dir: /Users/sylvain/Local_files/Kodi/test_cmake/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/xcodebuild -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTC_ea948 -configuration Debug -hideShellScriptEnvironment
User defaults from command line:
HideShellScriptEnvironment = YES
Prepare build
note: Using legacy build system
=== BUILD TARGET cmTC_ea948 OF PROJECT CMAKE_TRY_COMPILE WITH CONFIGURATION Debug ===
Check dependencies
Code Signing Error: Bundle identifier is missing. cmTC_ea948 doesn't have a bundle identifier for the Debug build configuration. Add a value for PRODUCT_BUNDLE_IDENTIFIER in the build settings editor.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'tvOS 12.2'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
stdout:
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - not found
CMake Error at /usr/local/Cellar/cmake/3.14.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.14.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.14.0/share/cmake/Modules/FindThreads.cmake:191 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:6 (find_package)
Thank you!
Edited by Sylvain CECCHETTO