Merge branch 'develop' of https://github.com/qqiangwu/nana into qqiangwu-develop
Conflicts: include/nana/deploy.hpp source/deploy.cpp
This commit is contained in:
commit
d521e9829b
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@ Thumbs.db
|
||||
#Ignore files build by Visual Studio
|
||||
bii/build/*
|
||||
bii/cmake/*
|
||||
bii/deps/*
|
||||
*.obj
|
||||
*.exe
|
||||
*.pdb
|
||||
|
@ -4,21 +4,48 @@
|
||||
# Robert Hauck - Enable support for PNG/Freetype
|
||||
# Qiangqiang Wu - Add biicode support
|
||||
|
||||
if(NOT BIICODE)
|
||||
project(nana)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
else()
|
||||
if(BIICODE)
|
||||
# prepare BII_LIB_SRC
|
||||
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()
|
||||
|
||||
list(REMOVE_ITEM BII_LIB_SRC ${trash_files})
|
||||
|
||||
if(WIN32)
|
||||
file(GLOB_RECURSE platform_files "*/detail/win32/*")
|
||||
list(APPEND BII_LIB_SRC ${platform_files})
|
||||
elseif(UNIX)
|
||||
file(GLOB_RECURSE platform_files "*/detail/linux_X11/*")
|
||||
list(APPEND BII_LIB_SRC ${platform_files})
|
||||
else()
|
||||
message(FATAL_ERROR "Only Windows and Unix are supported for the moment")
|
||||
endif()
|
||||
|
||||
# set compile flags
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
# we'll use the default config file so we can iliminate the following macro definitions
|
||||
if(MSVC)
|
||||
# More MSVC specific compilation flags
|
||||
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
endif()
|
||||
|
||||
add_biicode_targets()
|
||||
|
||||
return()
|
||||
endif()
|
||||
|
||||
project(nana)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
#Select platform automatically
|
||||
if(WIN32)
|
||||
add_definitions(-DNANA_WINDOWS)
|
||||
@ -33,21 +60,12 @@ if(WIN32)
|
||||
add_definitions(-DSTD_THREAD_NOT_SUPPORTED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(BIICODE)
|
||||
file(GLOB_RECURSE platform_files "*/detail/win32/*")
|
||||
list(APPEND BII_LIB_SRC ${platform_files})
|
||||
endif()
|
||||
endif()
|
||||
if(UNIX)
|
||||
add_definitions(-DNANA_LINUX)
|
||||
add_definitions(-DNANA_X11)
|
||||
add_definitions(-DPLATFORM_SPEC_HPP=<nana/detail/linux_X11/platform_spec.hpp>)
|
||||
add_definitions(-DSTD_CODECVT_NOT_SUPPORTED)
|
||||
if(BIICODE)
|
||||
file(GLOB_RECURSE platform_files "*/detail/linux_X11/*")
|
||||
list(APPEND BII_LIB_SRC ${platform_files})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@ -75,8 +93,6 @@ if(NANA_UNICODE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT BIICODE)
|
||||
#Find PNG
|
||||
if(UNIX)
|
||||
find_package(Freetype)
|
||||
@ -99,21 +115,17 @@ if(NOT BIICODE)
|
||||
endif()
|
||||
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/)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND}
|
||||
-E copy_if_different
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/nana/)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
if(BIICODE)
|
||||
add_biicode_targets()
|
||||
else()
|
||||
set(NANA_SOURCE_DIR ${CMAKE_SOURCE_DIR}/source)
|
||||
set(NANA_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include)
|
||||
|
||||
@ -149,4 +161,3 @@ else()
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib)
|
||||
install(DIRECTORY ${NANA_INCLUDE_DIR}/nana DESTINATION include)
|
||||
endif()
|
15
README.md
15
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
|
||||
|
@ -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
|
||||
|
@ -31,10 +31,11 @@
|
||||
#define NANA_X11 1
|
||||
#define PLATFORM_SPEC_HPP <nana/detail/linux_X11/platform_spec.hpp>
|
||||
#define STD_CODECVT_NOT_SUPPORTED
|
||||
#else
|
||||
# static_assert(false, "Only Windows and Unix are support now");
|
||||
#endif
|
||||
|
||||
//Here defines some flags that tell Nana what features will be supported.
|
||||
|
||||
#define NANA_UNICODE
|
||||
|
||||
#if defined(NANA_UNICODE) && defined(NANA_WINDOWS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user