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

Fix Mac OS compilation #328

Merged
merged 2 commits into from
Oct 3, 2023
Merged
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: 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__)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't WXMAC_OSX directive used anymore?
Thank you

#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
Loading