Skip to content

Minor fixes for Mac OS X #1

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

Open
wants to merge 5 commits 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
13 changes: 4 additions & 9 deletions nana/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ endif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
# enable static linkage # GNU || CLang not MinGW
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # AND NOT MINGW
# set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -pthread")
set(NANA_LINKS "${NANA_LINKS} -static-libgcc -static-libstdc++ -pthread")
if (NOT APPLE)
set(NANA_LINKS "${NANA_LINKS} -static-libgcc -static-libstdc++ -pthread")
endif (NOT APPLE)
# message("Setting NANA_LINKS to -static-libgcc -static-libstdc++ -pthread or ${NANA_LINKS}")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.3)
# IS_GNUCXX < 5.3
Expand All @@ -137,13 +139,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # AN

endif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # AND NOT MINGW


if (APPLE AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # APPLE Clang
# set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libstdc++")
set(NANA_LINKS "${NANA_LINKS} -stdlib=libstdc++")
endif ()


############# Optional libraries

# Find PNG
Expand Down Expand Up @@ -253,7 +248,7 @@ endforeach(subdir ${NANA_SOURCE_SUBDIRS})

include_directories(${NANA_INCLUDE_DIR})
add_library(${PROJECT_NAME} ${sources} )
target_link_libraries(${PROJECT_NAME} ${NANA_LINKS})
target_link_libraries(${PROJECT_NAME} ${NANA_LINKS} iconv)

# Headers: use INCLUDE_DIRECTORIES
# Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES)
Expand Down
2 changes: 1 addition & 1 deletion nana/include/nana/c++defines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
# else
# undef STD_FILESYSTEM_NOT_SUPPORTED
# endif
#elif defined(__GNUC__)
#elif defined(__GNUC__) && !defined(__clang__)
# if (__GNUC__ == 4 && __GNUC_MINOR__ < 6)
# define noexcept //no support of noexcept until GCC 4.6
# endif
Expand Down
1 change: 1 addition & 0 deletions nana/source/charset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <clocale>
#include <cstring> //Added by Pr0curo(pr#98)
#include <memory>
#include <locale>

//GCC 4.7.0 does not implement the <codecvt> and codecvt_utfx classes
#ifndef STD_CODECVT_NOT_SUPPORTED
Expand Down
1 change: 1 addition & 0 deletions nana/source/detail/platform_spec_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <X11/Xlocale.h>
#include <locale>
#include <clocale>
#include <map>
#include <set>
#include <algorithm>
Expand Down