CMake MiniBrowser should be an app bundle
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Apr 2016 05:56:45 +0000 (05:56 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Apr 2016 05:56:45 +0000 (05:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=156521

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

* PlatformMac.cmake:
Unreviewed build fix.  Define __STDC_WANT_LIB_EXT1__ so we can find memset_s.

Tools:

* MiniBrowser/mac/CMakeLists.txt:
Make an app bundle and compile nibs.
* MiniBrowser/mac/Info.plist:
CMake doesn't know what to do with :rfc1034identifier and there's no reason to keep it.  This is just MiniBrowser.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199530 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/PlatformMac.cmake
Tools/ChangeLog
Tools/MiniBrowser/mac/CMakeLists.txt
Tools/MiniBrowser/mac/Info.plist

index ba30c7a..33199ea 100644 (file)
@@ -1,3 +1,13 @@
+2016-04-13  Alex Christensen  <achristensen@webkit.org>
+
+        CMake MiniBrowser should be an app bundle
+        https://bugs.webkit.org/show_bug.cgi?id=156521
+
+        Reviewed by Brent Fulgham.
+
+        * PlatformMac.cmake:
+        Unreviewed build fix.  Define __STDC_WANT_LIB_EXT1__ so we can find memset_s.
+
 2016-04-13  Joseph Pecoraro  <pecoraro@apple.com>
 
         JSContext Inspector: Improve Class instances and JSC API Exported Values view in Console / ObjectTree
index 108370e..db7db32 100644 (file)
@@ -16,7 +16,7 @@ list(APPEND JavaScriptCore_SOURCES
     inspector/remote/RemoteInspector.mm
     inspector/remote/RemoteInspectorXPCConnection.mm
 )
-add_definitions(-DSTATICALLY_LINKED_WITH_WTF)
+add_definitions(-DSTATICALLY_LINKED_WITH_WTF -D__STDC_WANT_LIB_EXT1__)
 
 find_library(SECURITY_LIBRARY Security)
 list(APPEND JavaScriptCore_LIBRARIES
index 933396d..7cfd4ff 100644 (file)
@@ -1,3 +1,15 @@
+2016-04-13  Alex Christensen  <achristensen@webkit.org>
+
+        CMake MiniBrowser should be an app bundle
+        https://bugs.webkit.org/show_bug.cgi?id=156521
+
+        Reviewed by Brent Fulgham.
+
+        * MiniBrowser/mac/CMakeLists.txt:
+        Make an app bundle and compile nibs.
+        * MiniBrowser/mac/Info.plist:
+        CMake doesn't know what to do with :rfc1034identifier and there's no reason to keep it.  This is just MiniBrowser.
+
 2016-04-13  Chris Dumez  <cdumez@apple.com>
 
         We should not speculatively revalidate cached redirects
index 9f06baf..75ef6d4 100644 (file)
@@ -28,6 +28,17 @@ set(MiniBrowser_LIBRARIES
     WebKit2
 )
 
+set(EXECUTABLE_NAME MiniBrowser)
+set(PRODUCT_NAME MiniBrowser)
+
+set(MiniBrowser_Contents_Directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/MiniBrowser.app/Contents)
+make_directory(${MiniBrowser_Contents_Directory}/Resources)
+add_custom_target(BrowserWindowNib COMMAND ibtool --compile ${MiniBrowser_Contents_Directory}/Resources/BrowserWindow.nib ${MINIBROWSER_DIR}/BrowserWindow.xib VERBATIM)
+add_custom_target(ExtensionManagerWindowControllerNib COMMAND ibtool --compile ${MiniBrowser_Contents_Directory}/Resources/ExtensionManagerWindowController.nib ${MINIBROWSER_DIR}/ExtensionManagerWindowController.xib VERBATIM)
+add_custom_target(MainMenuNib COMMAND ibtool --compile ${MiniBrowser_Contents_Directory}/Resources/MainMenu.nib ${MINIBROWSER_DIR}/MainMenu.xib VERBATIM)
+
 include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
-add_executable(MiniBrowser ${MiniBrowser_SOURCES})
+add_executable(MiniBrowser MACOSX_BUNDLE ${MiniBrowser_SOURCES})
+set_target_properties(MiniBrowser PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${MINIBROWSER_DIR}/Info.plist)
 target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES})
+add_dependencies(MiniBrowser BrowserWindowNib ExtensionManagerWindowControllerNib MainMenuNib)
index 02cd496..32216bb 100644 (file)
@@ -9,7 +9,7 @@
        <key>CFBundleIconFile</key>
        <string>MiniBrowser</string>
        <key>CFBundleIdentifier</key>
-       <string>org.webkit.${PRODUCT_NAME:rfc1034identifier}</string>
+       <string>org.webkit.${PRODUCT_NAME}</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>