Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ option(LV_USE_LIBPNG "Use libpng to decode PNG" OFF)
option(LV_USE_LIBJPEG_TURBO "Use libjpeg turbo to decode JPEG" OFF)
option(LV_USE_FFMPEG "Use libffmpeg to display video using lv_ffmpeg" OFF)

# When this option is enabled, the executable program will be signed with get-task-allow ability and can be debugged
# with Xcode Instruments
option(XCODE_INSTRUMENTS_SIGN "Use codesign tool to sign the executable program with get-task-allow ability" OFF)

set(CMAKE_C_STANDARD 99)#C99 # lvgl officially support C99 and above
set(CMAKE_CXX_STANDARD 17)#C17
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down Expand Up @@ -87,3 +91,11 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_options(main PRIVATE -fsanitize=address,leak,undefined)
target_link_options(main PRIVATE -fsanitize=address,leak,undefined)
endif()

if (XCODE_INSTRUMENTS_SIGN)
# execute post codesign
add_custom_command(TARGET main POST_BUILD
COMMAND codesign -s - -v -f --entitlements=${PROJECT_SOURCE_DIR}/xcode_instruments_entitle.xml ${EXECUTABLE_OUTPUT_PATH}/main
COMMENT "codesign Simulator"
)
endif ()
8 changes: 8 additions & 0 deletions xcode_instruments_entitle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"\>
<plist version="1.0">
<dict>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>