Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small changes to the Mac OSX build. #1240

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ if(APPLE)
add_custom_command(
TARGET phd2
POST_BUILD
COMMAND cp ${asiCamera2} $<TARGET_FILE_DIR:phd2>/../Frameworks/
COMMAND install_name_tool -change @loader_path/libASICamera2.dylib
@executable_path/../Frameworks/libASICamera2.dylib $<TARGET_FILE:phd2>
COMMAND install_name_tool -change @loader_path/libusb-1.0.0.dylib
Expand All @@ -670,6 +671,7 @@ if(APPLE)
add_custom_command(
TARGET phd2
POST_BUILD
COMMAND cp ${qhylib} $<TARGET_FILE_DIR:phd2>/../Frameworks/
COMMAND install_name_tool -change @rpath/libqhyccd.20.dylib
@executable_path/../Frameworks/libqhyccd.dylib $<TARGET_FILE:phd2>
COMMAND install_name_tool -change /usr/local/lib/libusb-1.0.0.dylib
Expand All @@ -688,6 +690,7 @@ if(APPLE)
add_custom_command(
TARGET phd2
POST_BUILD
COMMAND cp ${toupcam} $<TARGET_FILE_DIR:phd2>/../Frameworks/
COMMAND install_name_tool -change @rpath/libtoupcam.dylib
@executable_path/../Frameworks/libtoupcam.dylib $<TARGET_FILE:phd2>
COMMENT "Updating dylib path for libtoupcam.dylib"
Expand All @@ -700,6 +703,7 @@ if(APPLE)
add_custom_command(
TARGET phd2
POST_BUILD
COMMAND cp ${ogmacam} $<TARGET_FILE_DIR:phd2>/../Frameworks/
COMMAND install_name_tool -change @rpath/libogmacam.dylib
@executable_path/../Frameworks/libogmacam.dylib $<TARGET_FILE:phd2>
COMMENT "Updating dylib path for libogmacam.dylib"
Expand All @@ -711,6 +715,7 @@ if(APPLE)
add_custom_command(
TARGET phd2
POST_BUILD
COMMAND cp ${SVBCameraSDK} $<TARGET_FILE_DIR:phd2>/../Frameworks/
COMMAND install_name_tool -change @rpath/libSVBCameraSDK.dylib
@executable_path/../Frameworks/libSVBCameraSDK.dylib $<TARGET_FILE:phd2>
COMMAND install_name_tool -change @rpath/libusb-1.0.0.dylib
Expand Down
2 changes: 2 additions & 0 deletions run_cmake-osx
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}" \
"$@" \
..
2 changes: 1 addition & 1 deletion src/myframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2910,7 +2910,7 @@ struct FocalLengthValidator : public wxIntegerValidator<int>
}
};

#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() { }
Expand Down
2 changes: 2 additions & 0 deletions thirdparty/thirdparty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down