Restructure Mac builds as Nostalgia.app

This commit is contained in:
Gary Talent 2017-10-20 22:14:33 -05:00
parent 2915b48130
commit b6b9181c66
6 changed files with 49 additions and 8 deletions

View File

@ -29,10 +29,20 @@ if(NOSTALGIA_IDE_BUILD STREQUAL "ON")
endif()
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_MACOSX_RPATH OFF)
set(CMAKE_INSTALL_NAME_DIR "@executable_path/../Library/nostalgia")
set(NOSTALGIA_DIST_BIN Nostalgia.app/Contents/MacOS)
set(NOSTALGIA_DIST_LIB Nostalgia.app/Contents/Library)
set(NOSTALGIA_DIST_PLUGIN Nostalgia.app/Contents/Plugins)
set(NOSTALGIA_DIST_RESOURCES Nostalgia.app/Contents/Resources)
set(NOSTALGIA_DIST_MAC_APP_CONTENTS Nostalgia.app/Contents)
else()
set(CMAKE_INSTALL_RPATH "$ORIGIN" "$ORIGIN/../lib/nostalgia")
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(NOSTALGIA_DIST_BIN bin)
set(NOSTALGIA_DIST_LIB lib)
set(NOSTALGIA_DIST_PLUGIN lib)
set(NOSTALGIA_DIST_RESOURCES share)
endif()
if (CMAKE_BUILD_TYPE STREQUAL "Release")

View File

@ -21,7 +21,7 @@ install(
TARGETS
NostalgiaCore-Studio
LIBRARY DESTINATION
lib/nostalgia
${NOSTALGIA_DIST_PLUGIN}/nostalgia
)
install(

View File

@ -24,18 +24,27 @@ target_link_libraries(
NostalgiaTool
)
if(APPLE)
install(
FILES
Info.plist
DESTINATION
${NOSTALGIA_DIST_MAC_APP_CONTENTS}
)
endif()
install(
FILES
nostalgia-studio.json
DESTINATION
share
${NOSTALGIA_DIST_RESOURCES}
)
install(
TARGETS
nostalgia-studio
RUNTIME DESTINATION
bin
${NOSTALGIA_DIST_BIN}
)
add_subdirectory(lib)

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>nostalgia-studio</string>
<key>CFBundleGetInfoString</key>
<string>Nostalgia Studio</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>net.drinkingtea.nostalgia.studio</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleVersion</key>
<string>1.2.8</string>
<key>LSMinimumSystemVersion</key>
<string>10.13.0</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright (c) 2016-2017 Gary Talent &lt;gtalent2@gmail.com&gt;</string>
</dict>
</plist>

View File

@ -16,7 +16,7 @@ add_library(
)
install(TARGETS NostalgiaStudio
LIBRARY DESTINATION lib/nostalgia)
LIBRARY DESTINATION ${NOSTALGIA_DIST_LIB}/nostalgia)
target_link_libraries(
NostalgiaStudio

View File

@ -29,6 +29,6 @@ install(
install(
TARGETS
NostalgiaTool
LIBRARY DESTINATION lib/nostalgia
ARCHIVE DESTINATION lib/nostalgia
LIBRARY DESTINATION ${NOSTALGIA_DIST_LIB}/nostalgia
ARCHIVE DESTINATION ${NOSTALGIA_DIST_LIB}/nostalgia
)