mac:config.h.in use macos extention
This commit is contained in:
parent
4e4faafb08
commit
4dbbc40539
@ -150,15 +150,20 @@ endif()
|
||||
|
||||
if(NOT DEFINED BUNDLE_BASE_INSTALL_DIR)
|
||||
if(APPLE)
|
||||
set(BUNDLE_BASE_INSTALL_DIR "${CMAKE_BUILD_TYPE}")
|
||||
set(BUNDLE_BASE_INSTALL_DIR "${CMAKE_BUILD_TYPE}/MacOS")
|
||||
else()
|
||||
set(BUNDLE_BASE_INSTALL_DIR "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(BUILD_BUNDLE)
|
||||
set(BINDIR .)
|
||||
set(CMAKE_INSTALL_PREFIX "${BUNDLE_BASE_INSTALL_DIR}")
|
||||
if(APPLE)
|
||||
set(BINDIR "${BUNDLE_BASE_INSTALL_DIR}")
|
||||
set(CMAKE_INSTALL_PREFIX ".")
|
||||
else()
|
||||
set(BINDIR .)
|
||||
set(CMAKE_INSTALL_PREFIX "${BUNDLE_BASE_INSTALL_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED BINDIR)
|
||||
@ -168,7 +173,7 @@ endif()
|
||||
if(NOT DEFINED DATADIR)
|
||||
if(BUILD_BUNDLE)
|
||||
if(APPLE)
|
||||
set(DATADIR "../Resources/share")
|
||||
set(DATADIR "${CMAKE_BUILD_TYPE}/Resources/share")
|
||||
else()
|
||||
set(DATADIR .)
|
||||
endif()
|
||||
@ -180,7 +185,7 @@ endif()
|
||||
if(NOT DEFINED LIBDIR)
|
||||
if(BUILD_BUNDLE)
|
||||
if(APPLE)
|
||||
set(LIBDIR "../Frameworks")
|
||||
set(LIBDIR "${CMAKE_BUILD_TYPE}/Frameworks")
|
||||
else()
|
||||
set(LIBDIR .)
|
||||
endif()
|
||||
|
@ -107,4 +107,8 @@ endif(WIN32)
|
||||
# build version.h from template
|
||||
configure_file("${PROJECT_SOURCE_DIR}/rtgui/version.h.in" "${CMAKE_BINARY_DIR}/rtgui/version.h")
|
||||
# build AboutThisBuild.txt from template
|
||||
configure_file("${PROJECT_SOURCE_DIR}/AboutThisBuild.txt.in" "${CMAKE_BINARY_DIR}/AboutThisBuild.txt")
|
||||
if(APPLE)
|
||||
configure_file("${PROJECT_SOURCE_DIR}/AboutThisBuild.txt.in" "${CMAKE_BINARY_DIR}/AboutThisBuild.txt")
|
||||
else()
|
||||
configure_file("${PROJECT_SOURCE_DIR}/AboutThisBuild.txt.in" "${CMAKE_BINARY_DIR}/AboutThisBuild.txt")
|
||||
endif()
|
||||
|
@ -24,10 +24,10 @@
|
||||
#cmakedefine HAVE_UNALIGNED_MALLOC
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define DATA_SEARCH_PATH "/Applications/RawTherapee.com/Contents/Resources/share"
|
||||
#define DOC_SEARCH_PATH "/Applications/RawTherapee.com/Contents/Resources"
|
||||
#define CREDITS_SEARCH_PATH "/Applications/RawTherapee.com/Contents/Resources"
|
||||
#define LICENCE_SEARCH_PATH "/Applications/RawTherapee.com/Contents/Resources"
|
||||
#define DATA_SEARCH_PATH "/Applications/RawTherapee.app/Contents/Resources/share"
|
||||
#define DOC_SEARCH_PATH "/Applications/RawTherapee.app/Contents/Resources"
|
||||
#define CREDITS_SEARCH_PATH "/Applications/RawTherapee.app/Contents/Resources"
|
||||
#define LICENCE_SEARCH_PATH "/Applications/RawTherapee.app/Contents/Resources"
|
||||
#define LENSFUN_DB_PATH "${LENSFUNDBDIR}"
|
||||
#else
|
||||
#define DATA_SEARCH_PATH "${DATADIR}"
|
||||
|
@ -130,19 +130,20 @@ install -d "${MACOS}"
|
||||
install -d "${LIB}"
|
||||
install -d "${ETC}"
|
||||
|
||||
echo "\n--------\n" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
||||
echo "Bundle system: $(sysctl -n machdep.cpu.brand_string)" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
||||
echo "Bundle OS: $(sw_vers -productName) $(sw_vers -productVersion) $(sw_vers -buildVersion) $(uname -mrs)" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
||||
echo "Bundle date: $(date -Ru) ZULU" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
||||
echo "Bundle epoch: $(date +%s)" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
||||
echo "Bundle UUID: $(uuidgen|tr 'A-Z' 'a-z')" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt"
|
||||
|
||||
msg "Copying binary executable files."
|
||||
ditto "${CMAKE_BUILD_TYPE}/MacOS" "${MACOS}"
|
||||
|
||||
msg "Copying Resources directory."
|
||||
mv "${CMAKE_BUILD_TYPE}/Resources/share/AboutThisBuild.txt"
|
||||
ditto "${CMAKE_BUILD_TYPE}/Resources" "${RESOURCES}"
|
||||
|
||||
echo "\n--------\n" >> "${RESOURCES}/AboutThisBuild.txt"
|
||||
echo "Bundle system: $(sysctl -n machdep.cpu.brand_string)" >> "${RESOURCES}/AboutThisBuild.txt"
|
||||
echo "Bundle OS: $(sw_vers -productName) $(sw_vers -productVersion) $(sw_vers -buildVersion) $(uname -mrs)" >> "${RESOURCES}/AboutThisBuild.txt"
|
||||
echo "Bundle date: $(date -Ru) ZULU" >> "${RESOURCES}/AboutThisBuild.txt"
|
||||
echo "Bundle epoch: $(date +%s)" >> "${RESOURCES}/AboutThisBuild.txt"
|
||||
echo "Bundle UUID: $(uuidgen|tr 'A-Z' 'a-z')" >> "${RESOURCES}/AboutThisBuild.txt"
|
||||
|
||||
# Copy the Lensfun database into the app bundle
|
||||
mkdir -p "${RESOURCES}/share/lensfun"
|
||||
ditto ${LOCAL_PREFIX}/local/share/lensfun/version_2/* "${RESOURCES}/share/lensfun"
|
||||
|
Loading…
x
Reference in New Issue
Block a user