diff --git a/.gitignore b/.gitignore index ff2a3af0..c3cd3cfa 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ Thumbs.db #Ignore files build by Visual Studio bii/build/* bii/cmake/* +bii/deps/* *.obj *.exe *.pdb diff --git a/CMakeLists.txt b/CMakeLists.txt index 72cda278..f05fe10f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ else() set(LIB_SRC ${BII_LIB_SRC}) foreach(cpp ${BII_LIB_SRC}) - if(${cpp} MATCHES "(include/nana|source)/detail/[A-Za-z0-9_]+/.+$") + if(${cpp} MATCHES "/detail/(win32|linux_X11)/.+$") list(APPEND trash_files ${cpp}) endif() endforeach() @@ -100,12 +100,18 @@ if(NOT BIICODE) endif() endif() else() - add_definitions(-DNANA_LIBPNG) add_definitions(-DNANA_ENABLE_PNG) endif() #Copy our new config.hpp (with removed defines) -execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.hpp ${CMAKE_CURRENT_SOURCE_DIR}/include/nana/) +if(NOT BIICODE) +# I don't know how it works!!! +message("Check config.hpp and copy") +execute_process(COMMAND ${CMAKE_COMMAND} + -E copy_if_different + ${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/include/nana/) +endif() if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") diff --git a/README.md b/README.md index 9f85c35f..0b034cf6 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,21 @@ Nana is licensed under the [Boost Software License]. [Boost Software License]: http://www.boost.org/LICENSE_1_0.txt +## Biicode +Nana is available in biicode, download biicode and try the nana example: + +``` +> mkdir try-nana +> cd try-nana +> bii init +> bii open qiangwu/nana-example +> bii find +> bii build +> cd bin +``` + +Run it! All dependencies will be resovled automatically by biicode! Amazing, isn't it? + ## Support The best way to get help with Nana library is by visiting http://nanapro.org/help.htm diff --git a/biicode.conf b/biicode.conf index a29a8779..872c1375 100644 --- a/biicode.conf +++ b/biicode.conf @@ -1,9 +1,7 @@ # Biicode configuration file [requirements] - # Blocks and versions this block depends on e.g. - # user/depblock1: 3 - # user2/depblock2(track) @tag + glenn/png: 6 [parent] # The parent version of this block. Must match folder name. E.g. @@ -21,7 +19,8 @@ # Manual adjust file implicit dependencies, add (+), remove (-), or overwrite (=) # hello.h + hello_imp.cpp hello_imp2.cpp # *.h + *.cpp - include/nana/config.hpp + build/cmake/config.hpp + include/nana/config.hpp + include/* + include/nana/config.hpp + source/* [mains] # Manual adjust of files that define an executable @@ -40,6 +39,7 @@ [includes] # Mapping of include patterns to external blocks # hello*.h: user3/depblock # includes will be processed as user3/depblock/hello*.h + png.h: glenn/png [data] # Manually define data files dependencies, that will be copied to bin for execution diff --git a/include/nana/std_condition_variable.hpp b/include/nana/std_condition_variable.hpp index 72399b59..39e2169b 100644 --- a/include/nana/std_condition_variable.hpp +++ b/include/nana/std_condition_variable.hpp @@ -2,11 +2,17 @@ #define NANA_STD_CONDITION_VARIABLE_HPP #include -#if defined(STD_THREAD_NOT_SUPPORTED) +#if defined(STD_THREAD_NOT_SUPPORTED) && !defined(NANA_MINGW) || __GNUC_MINOR__ < 8 + #include namespace std { typedef boost::condition_variable condition_variable; } + +#else + +#include + #endif #endif // NANA_STD_CONDITION_VARIABLE_HPP diff --git a/include/nana/std_mutex.hpp b/include/nana/std_mutex.hpp index 9fdebfc6..81740e72 100644 --- a/include/nana/std_mutex.hpp +++ b/include/nana/std_mutex.hpp @@ -2,7 +2,8 @@ #define NANA_STD_MUTEX_HPP #include -#if defined(STD_THREAD_NOT_SUPPORTED) +#if defined(STD_THREAD_NOT_SUPPORTED) && !defined(NANA_MINGW) || __GNUC_MINOR__ < 8 + #include #include #include @@ -18,5 +19,10 @@ namespace std typedef boost::mutex mutex; typedef boost::recursive_mutex recursive_mutex; } +#else + +#include + #endif + #endif // NANA_STD_MUTEX_HPP diff --git a/include/nana/std_thread.hpp b/include/nana/std_thread.hpp index 572193ac..7237c20c 100644 --- a/include/nana/std_thread.hpp +++ b/include/nana/std_thread.hpp @@ -2,12 +2,16 @@ #define NANA_STD_THREAD_HPP #include -#if defined(STD_THREAD_NOT_SUPPORTED) +#if defined(STD_THREAD_NOT_SUPPORTED) && !defined(NANA_MINGW) || __GNUC_MINOR__ < 8 #include namespace std { typedef boost::thread thread; } +#else + +#include + #endif #endif // NANA_STD_THREAD_HPP