]> Creatis software - creaContours.git/commitdiff
#3407 Bundle bug in MacOS Tahoe
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Mon, 23 Nov 2026 12:37:24 +0000 (13:37 +0100)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Mon, 23 Nov 2026 12:37:24 +0000 (13:37 +0100)
appli/wxContourGUIExample/CMakeLists.txt
cmake/customtemplate.plist.in [new file with mode: 0644]

index 9a0ec88..e97ba6d 100644 (file)
@@ -34,9 +34,22 @@ IF(WIN32)
        SET_TARGET_PROPERTIES(creaContourApp PROPERTIES LINK_FLAGS /subsystem:console )
   ENDIF(MINGW)
  
-  
 ELSE(WIN32)
+  
+    ## EED 2026-11-23   
   ADD_EXECUTABLE(creaContourApp MACOSX_BUNDLE wxContourGUIExample)
+  
+    set(CUR_TARGET creaContourApp)
+  ADD_EXECUTABLE(${CUR_TARGET} MACOSX_BUNDLE ${SOURCES}  )  
+  set_target_properties(${CUR_TARGET}  PROPERTIES
+    BUNDLE True
+    MACOSX_BUNDLE_GUI_IDENTIFIER my.domain.style.identifier.${CUR_TARGET}
+    MACOSX_BUNDLE_BUNDLE_NAME ${CUR_TARGET}
+    MACOSX_BUNDLE_BUNDLE_VERSION "0.1"
+    MACOSX_BUNDLE_SHORT_VERSION_STRING "0.1"
+    MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/cmake/customtemplate.plist.in
+  )
+  
 ENDIF(WIN32)
 
 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
diff --git a/cmake/customtemplate.plist.in b/cmake/customtemplate.plist.in
new file mode 100644 (file)
index 0000000..847d22c
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://apple.com">
+<plist version="1.0">
+<dict>
+    <key>CFBundleExecutable</key>
+    <string>@MACOSX_BUNDLE_EXECUTABLE_NAME@</string>
+    <key>CFBundleIdentifier</key>
+    <string>@MACOSX_BUNDLE_GUI_IDENTIFIER@</string>
+    <key>CFBundleName</key>
+    <string>@MACOSX_BUNDLE_BUNDLE_NAME@</string>
+    <key>CFBundleVersion</key>
+    <string>@MACOSX_BUNDLE_BUNDLE_VERSION@</string>
+    <key>CFBundleShortVersionString</key>
+    <string>@MACOSX_BUNDLE_SHORT_VERSION_STRING@</string>
+    <key>CFBundlePackageType</key>
+    <string>APPL</string>
+    <key>NSHighResolutionCapable</key>
+    <true/>
+    <!-- Example custom key (e.g., camera permission) -->
+    <key>NSCameraUsageDescription</key>
+    <string>@MY_CAMERA_PERMISSION_TEXT@</string>
+</dict>
+</plist>