From c7cd7c5f9b88817ab5071dfadd08fb540aa7ddfc Mon Sep 17 00:00:00 2001 From: Robert Al Lakis Date: Mon, 2 Oct 2023 11:31:28 -0300 Subject: [PATCH] Fix Mac compilation fbclient linking --- .gitignore | 5 ++++- CMakeLists.txt | 7 ++++--- src/config/Config.h | 2 +- src/frversion.h | 2 +- src/main.cpp | 4 ++++ 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 5a522aa1f..29d15e382 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,7 @@ build*/ *.db # Visual Studio 2015 cache/options directory .vs/ - +#XCode +.DS_Store +xcuserdata +project.xcworkspace diff --git a/CMakeLists.txt b/CMakeLists.txt index ec547a2e5..58effed1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -428,14 +428,14 @@ if(APPLE) "Please get in contact to tell us of your results.") add_definitions(-DIBPP_DARWIN) list(APPEND FR_LIBS -lfbclient) - + list(APPEND FR_LIBS -L/Library/Frameworks/Firebird.framework/Versions/Current/Libraries) + list(APPEND SOURCE_LIST ${SOURCEDIR}/gui/mac/StyleGuideMAC.cpp ) add_definitions(-DFR_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}") - list(APPEND FR_LIBS -lfbclient) - + # Create the revision include file execute_process( COMMAND "${CMAKE_SOURCE_DIR}/update-revision-info.sh" @@ -526,6 +526,7 @@ endif (APPLE) target_link_libraries(${PROJECT_NAME} IBPP ${wxWidgets_LIBRARIES} ${FR_LIBS}) + #-------------------------------------- # Install if (UNIX AND NOT APPLE) diff --git a/src/config/Config.h b/src/config/Config.h index d279019a6..676185c56 100644 --- a/src/config/Config.h +++ b/src/config/Config.h @@ -44,7 +44,7 @@ class wxFileConfig; //! Do not instantiate objects of this class. Use config() function (see below). -#if defined(__UNIX__) && !defined(__WXMAC_OSX__) +#if defined(__UNIX__) && !defined(__WXOSX_COCOA__) #define FR_CONFIG_USE_PRIVATE_STDPATHS #else #undef FR_CONFIG_USE_PRIVATE_STDPATHS diff --git a/src/frversion.h b/src/frversion.h index 688f7ec0f..b41251a70 100644 --- a/src/frversion.h +++ b/src/frversion.h @@ -1,6 +1,6 @@ #define FR_VERSION_MAJOR 0 #define FR_VERSION_MINOR 9 -#define FR_VERSION_RLS 7 +#define FR_VERSION_RLS 8 // if this file can't be found you need to run the update-revision-info script #include "revisioninfo.h" diff --git a/src/main.cpp b/src/main.cpp index 34a0f1393..0de58658e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -80,6 +80,10 @@ bool Application::OnInit() checkEnvironment(); parseCommandLine(); +#if defined(__WXOSX_COCOA__) + std::locale::global(std::locale("")); +#endif + // initialize IBPP library - if it fails: exit try {