Skip to content

Commit

Permalink
Merge pull request #328 from rlakis/master
Browse files Browse the repository at this point in the history
Fix Mac OS compilation
  • Loading branch information
arvanus authored Oct 3, 2023
2 parents b21fe97 + 49cdea1 commit c8e4bb4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ build*/
*.db
# Visual Studio 2015 cache/options directory
.vs/

#XCode
.DS_Store
xcuserdata
project.xcworkspace
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -526,6 +526,7 @@ endif (APPLE)

target_link_libraries(${PROJECT_NAME} IBPP ${wxWidgets_LIBRARIES} ${FR_LIBS})


#--------------------------------------
# Install
if (UNIX AND NOT APPLE)
Expand Down
2 changes: 1 addition & 1 deletion src/config/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit c8e4bb4

Please sign in to comment.