From ca5ae234108ffd60bfdf973736177655f7cacb36 Mon Sep 17 00:00:00 2001 From: Pr0curo Date: Sun, 3 Jan 2016 22:38:41 +0100 Subject: [PATCH 1/3] change 'CMakeLists.txt' encoding to utf8 --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e416d60c..0880be44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ #https://cmake.org/cmake-tutorial/ #https://cmake.org/cmake/help/v3.3/module/CMakeDependentOption.html?highlight=cmakedependentoption -# use CACHE FORCE or set(USE_meganz_mingw_std_threads ON) or delete CMakecache.txt or the entirely build dir +# use CACHE FORCE or set(USE_meganz_mingw_std_threads ON) or delete CMakecache.txt or the entirely build dir # if your changes don't execute option(USE_meganz_mingw_std_threads "replaced boost.thread with meganz's mingw-std-threads." OFF) option(USE_UNICODE "Use Unicode Character Set" ON) @@ -143,8 +143,8 @@ aux_source_directory(${NANA_SOURCE_DIR}/paint/detail NANA_PAINT_DETAIL_SOURCE) aux_source_directory(${NANA_SOURCE_DIR}/system NANA_SYSTEM_SOURCE) aux_source_directory(${NANA_SOURCE_DIR}/threads NANA_THREADS_SOURCE) -#To show .h files in Visual Studio, add them to the list of sources in add_executable / add_library -#and Use SOURCE_GROUP if all your sources are in the same directory +#To show .h files in Visual Studio, add them to the list of sources in add_executable / add_library +#and Use SOURCE_GROUP if all your sources are in the same directory add_library(${PROJECT_NAME} ${NANA_SOURCE} ${NANA_DETAIL_SOURCE} @@ -163,8 +163,8 @@ endif (NOT APPLE) ${NANA_THREADS_SOURCE}) if(APPLE) - #Headers: use INCLUDE_DIRECTORIES - # Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES + #Headers: use INCLUDE_DIRECTORIES + # Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES target_link_libraries(${PROJECT_NAME} -L/opt/X11/lib/ -lX11 -lXft -lpng -liconv) endif(APPLE) From d6d9976285e48eaff31565fd01a5b5ddce54fda4 Mon Sep 17 00:00:00 2001 From: Pr0curo Date: Sun, 3 Jan 2016 22:40:17 +0100 Subject: [PATCH 2/3] resolve 'if' error within CMakeLists.txt Appearently CMake cannot deal with if/endif within the add_library call. Thus the call is now completly enclosed from the if/endif statements --- CMakeLists.txt | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0880be44..f2024d27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -146,13 +146,12 @@ aux_source_directory(${NANA_SOURCE_DIR}/threads NANA_THREADS_SOURCE) #To show .h files in Visual Studio, add them to the list of sources in add_executable / add_library #and Use SOURCE_GROUP if all your sources are in the same directory +if(NOT APPLE) add_library(${PROJECT_NAME} ${NANA_SOURCE} ${NANA_DETAIL_SOURCE} ${NANA_FILESYSTEM_SOURCE} -if(NOT APPLE) ${NANA_AUDIO_SOURCE} ${NANA_AUDIO_DETAIL_SOURCE} -endif (NOT APPLE) ${NANA_GUI_SOURCE} ${NANA_GUI_DETAIL_SOURCE} ${NANA_GUI_WIDGETS_SOURCE} @@ -160,9 +159,24 @@ endif (NOT APPLE) ${NANA_PAINT_SOURCE} ${NANA_PAINT_DETAIL_SOURCE} ${NANA_SYSTEM_SOURCE} - ${NANA_THREADS_SOURCE}) + ${NANA_THREADS_SOURCE}) +endif (NOT APPLE) + if(APPLE) +add_library(${PROJECT_NAME} ${NANA_SOURCE} + ${NANA_DETAIL_SOURCE} + ${NANA_FILESYSTEM_SOURCE} + ${NANA_AUDIO_SOURCE} + ${NANA_AUDIO_DETAIL_SOURCE} + ${NANA_GUI_SOURCE} + ${NANA_GUI_DETAIL_SOURCE} + ${NANA_GUI_WIDGETS_SOURCE} + ${NANA_GUI_WIDGETS_SKELETONS_SOURCE} + ${NANA_PAINT_SOURCE} + ${NANA_PAINT_DETAIL_SOURCE} + ${NANA_SYSTEM_SOURCE} + ${NANA_THREADS_SOURCE}) #Headers: use INCLUDE_DIRECTORIES # Libraries: use FIND_LIBRARY and link with the result of it (try to avoid LINK_DIRECTORIES target_link_libraries(${PROJECT_NAME} -L/opt/X11/lib/ -lX11 -lXft -lpng -liconv) From 4c854f449cef42097e3fbd740a6f94d90dad1e0c Mon Sep 17 00:00:00 2001 From: Pr0curo Date: Sun, 3 Jan 2016 23:22:25 +0100 Subject: [PATCH 3/3] add dependencies in charset.cpp --- source/charset.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/charset.cpp b/source/charset.cpp index 388729a9..eed89a8d 100644 --- a/source/charset.cpp +++ b/source/charset.cpp @@ -18,6 +18,7 @@ #include #include #include +#include //GCC 4.7.0 does not implement the and codecvt_utfx classes #ifndef STD_CODECVT_NOT_SUPPORTED