diff --git a/CMakeLists.txt b/CMakeLists.txt index c7c6c1a47..cd8a54c8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -655,6 +655,7 @@ if(APPLE) add_custom_command( TARGET phd2 POST_BUILD + COMMAND cp ${asiCamera2} $/../Frameworks/ COMMAND install_name_tool -change @loader_path/libASICamera2.dylib @executable_path/../Frameworks/libASICamera2.dylib $ COMMAND install_name_tool -change @loader_path/libusb-1.0.0.dylib @@ -670,6 +671,7 @@ if(APPLE) add_custom_command( TARGET phd2 POST_BUILD + COMMAND cp ${qhylib} $/../Frameworks/ COMMAND install_name_tool -change @rpath/libqhyccd.20.dylib @executable_path/../Frameworks/libqhyccd.dylib $ COMMAND install_name_tool -change /usr/local/lib/libusb-1.0.0.dylib @@ -688,6 +690,7 @@ if(APPLE) add_custom_command( TARGET phd2 POST_BUILD + COMMAND cp ${toupcam} $/../Frameworks/ COMMAND install_name_tool -change @rpath/libtoupcam.dylib @executable_path/../Frameworks/libtoupcam.dylib $ COMMENT "Updating dylib path for libtoupcam.dylib" @@ -700,6 +703,7 @@ if(APPLE) add_custom_command( TARGET phd2 POST_BUILD + COMMAND cp ${ogmacam} $/../Frameworks/ COMMAND install_name_tool -change @rpath/libogmacam.dylib @executable_path/../Frameworks/libogmacam.dylib $ COMMENT "Updating dylib path for libogmacam.dylib" @@ -711,6 +715,7 @@ if(APPLE) add_custom_command( TARGET phd2 POST_BUILD + COMMAND cp ${SVBCameraSDK} $/../Frameworks/ COMMAND install_name_tool -change @rpath/libSVBCameraSDK.dylib @executable_path/../Frameworks/libSVBCameraSDK.dylib $ COMMAND install_name_tool -change @rpath/libusb-1.0.0.dylib diff --git a/run_cmake-osx b/run_cmake-osx index 0649d2f8e..3cb24df92 100755 --- a/run_cmake-osx +++ b/run_cmake-osx @@ -34,10 +34,12 @@ cd "$here" mkdir -p "$tmp" cd "$tmp" + cmake -G "Unix Makefiles" \ -DwxWidgets_PREFIX_DIRECTORY="$WXWIN" \ -DCMAKE_OSX_ARCHITECTURES="$APPLE_ARCH" \ -DCMAKE_BUILD_TYPE="$buildtype" \ + -DCMAKE_EXE_LINKER_FLAGS_RELEASE="-lz" \ "${cmake_extra_args[@]}" \ "$@" \ .. diff --git a/src/myframe.cpp b/src/myframe.cpp index e926e5fd0..933c79018 100644 --- a/src/myframe.cpp +++ b/src/myframe.cpp @@ -2910,7 +2910,7 @@ struct FocalLengthValidator : public wxIntegerValidator } }; -#if defined(__LINUX__) || defined(__FreeBSD__) +#if defined(__LINUX__) || defined(__FreeBSD__) || defined(__APPLE__) // ugly workaround for Issue 83 - link error on Linux // undefined reference to wxPluralFormsCalculatorPtr::~wxPluralFormsCalculatorPtr wxPluralFormsCalculatorPtr::~wxPluralFormsCalculatorPtr() { } diff --git a/thirdparty/thirdparty.cmake b/thirdparty/thirdparty.cmake index e8566ed7e..71ab7a174 100644 --- a/thirdparty/thirdparty.cmake +++ b/thirdparty/thirdparty.cmake @@ -514,6 +514,8 @@ else() FetchContent_Declare( googletest URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz + # Compiling on Mac OSX Sonoma requires v1.15.2 - Comment the URL line above and uncomment URL line below for mac compilation + #URL https://github.com/google/googletest/releases/download/v1.15.2/googletest-1.15.2.tar.gz ) # For Windows: Prevent overriding the parent project's compiler/linker settings set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)