mirror of
https://github.com/fltk/fltk.git
synced 2026-05-21 06:21:26 +08:00
macOS build: add ad-hoc signature to test program bundles.
Unsigned bundles behave incorrectly when the app calls fl_open_callback() and a file is dragged on the bundle icon to launch it: a delay of several seconds occurs before the app shows its GUI.
This commit is contained in:
@@ -102,6 +102,9 @@ function(fl_create_example NAME SOURCES LIBRARIES)
|
||||
|
||||
if(MAC_BUNDLE)
|
||||
add_executable (${TARGET_NAME} MACOSX_BUNDLE ${srcs} ${ICON_PATH})
|
||||
# add ad-hoc signature
|
||||
add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND
|
||||
codesign -s - ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/${TARGET_NAME}.app)
|
||||
else()
|
||||
add_executable (${TARGET_NAME} WIN32 ${srcs})
|
||||
endif(MAC_BUNDLE)
|
||||
|
||||
Reference in New Issue
Block a user