[DEV] add CMake instance

This commit is contained in:
Edouard DUPIN 2014-02-24 21:50:50 +01:00
parent b055156aa6
commit 69ef5682fe
14 changed files with 316 additions and 22 deletions

8
CMakeLists.txt Normal file
View File

@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 2.8)
# include external sub libs :
SUBDIRS(external)
#include ewol sources
SUBDIRS(sources)
#add_subdirectory

View File

@ -1,2 +1,15 @@
#SUBDIRS(bullet/bullet/src z/zlib/ etk png )
SUBDIRS(bullet z/zlib/ etk png )
cmake_minimum_required(VERSION 2.8)
SUBDIRS(bullet)
SUBDIRS(z/zlib)
SUBDIRS(edtaa3)
SUBDIRS(etk)
SUBDIRS(png)
SUBDIRS(freetype)
SUBDIRS(agg)
SUBDIRS(ejson)
SUBDIRS(exml)
SUBDIRS(esvg)
SUBDIRS(egami)
SUBDIRS(date)

2
external/agg vendored

@ -1 +1 @@
Subproject commit 9d19bb097a2330ec6c2403a0afebc8aa6b855dcc
Subproject commit cd7251e11267419cda8dec02c227856a93be21b7

View File

@ -1,27 +1,64 @@
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 2.8)
# Declare the project
project(bulletlib)
project(linearmath)
# set output path:
set(LIBRARY_OUTPUT_PATH lib/${CMAKE_BUILD_TYPE})
include_directories(bullet/src)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_DIR}/bullet/src )
#Create src file list
set(src_files
bullet/src/LinearMath/btQuickprof.cpp
bullet/src/LinearMath/btGeometryUtil.cpp
SET(LinearMath_SRCS
bullet/src/LinearMath/btAlignedAllocator.cpp
bullet/src/LinearMath/btSerializer.cpp
bullet/src/LinearMath/btConvexHull.cpp
bullet/src/LinearMath/btPolarDecomposition.cpp
bullet/src/LinearMath/btVector3.cpp
bullet/src/LinearMath/btConvexHullComputer.cpp
bullet/src/LinearMath/btGeometryUtil.cpp
bullet/src/LinearMath/btPolarDecomposition.cpp
bullet/src/LinearMath/btQuickprof.cpp
bullet/src/LinearMath/btSerializer.cpp
bullet/src/LinearMath/btVector3.cpp
)
#add_definitions( -DDEBUG_LEVEL=3 )
SET(LinearMath_HDRS
bullet/src/LinearMath/btAabbUtil2.h
bullet/src/LinearMath/btAlignedAllocator.h
bullet/src/LinearMath/btAlignedObjectArray.h
bullet/src/LinearMath/btConvexHull.h
bullet/src/LinearMath/btConvexHullComputer.h
bullet/src/LinearMath/btDefaultMotionState.h
bullet/src/LinearMath/btGeometryUtil.h
bullet/src/LinearMath/btGrahamScan2dConvexHull.h
bullet/src/LinearMath/btHashMap.h
bullet/src/LinearMath/btIDebugDraw.h
bullet/src/LinearMath/btList.h
bullet/src/LinearMath/btMatrix3x3.h
bullet/src/LinearMath/btMinMax.h
bullet/src/LinearMath/btMotionState.h
bullet/src/LinearMath/btPolarDecomposition.h
bullet/src/LinearMath/btPoolAllocator.h
bullet/src/LinearMath/btQuadWord.h
bullet/src/LinearMath/btQuaternion.h
bullet/src/LinearMath/btQuickprof.h
bullet/src/LinearMath/btRandom.h
bullet/src/LinearMath/btScalar.h
bullet/src/LinearMath/btSerializer.h
bullet/src/LinearMath/btStackAlloc.h
bullet/src/LinearMath/btTransform.h
bullet/src/LinearMath/btTransformUtil.h
bullet/src/LinearMath/btVector3.h
)
#Create a static Lib:
add_library(linearmath STATIC ${src_files} )
#ADD_LIBRARY(LinearMath STATIC ${LinearMath_SRCS} ${LinearMath_HDRS})
#Create a static Lib:
add_library(linearmath STATIC ${LinearMath_SRCS} ${LinearMath_HDRS} )
#include_directories(${CMAKE_CURRENT_DIR}/bullet/src)
#set(linearmath_INCLUDE_DIR "bullet/src")
#include_directories(${CMAKE_CURRENT_DIR}/bullet/src)
#link_directories(${CMAKE_CURRENT_DIR}/bullet/src)
#message(STATUS "linearmath_INCLUDE_DIR=${linearmath_INCLUDE_DIR}")

70
external/date/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,70 @@
cmake_minimum_required(VERSION 2.8)
# Declare the project
project(date)
##
## Include C++ X11 dependency ... (check correct flags)
##
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
endif()
# set output path:
set(LIBRARY_OUTPUT_PATH lib/${CMAKE_BUILD_TYPE})
include_directories(.)
#Create src file list
set(src_files
date/date.cpp
)
add_definitions( -DDEBUG_LEVEL=3 )
add_definitions( -DDEBUG=1 )
if (WIN32)
execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE RESULT)
#string(REGEX REPLACE "(..)/(..)/..(..).*" "\\1/\\2/\\3" ${RESULT} ${${RESULT}})
message(STATUS "Current date : ${RESULT}")
add_definitions( -DBUILD_DAY=0 )
add_definitions( -DBUILD_YEAR=0 )
add_definitions( -DBUILD_MONTH=0 )
else ()
if (UNIX)
execute_process(COMMAND "date" "+%d" OUTPUT_VARIABLE RESULT_DAY)
execute_process(COMMAND "date" "+%m" OUTPUT_VARIABLE RESULT_MONTH)
execute_process(COMMAND "date" "+%Y" OUTPUT_VARIABLE RESULT_YEAR)
add_definitions( -DBUILD_DAY=0 )
add_definitions( -DBUILD_YEAR=0 )
add_definitions( -DBUILD_MONTH=0 )
#string(REGEX REPLACE "(..)/(..)/..(..).*" "\\1/\\2/\\3" ${RESULT} ${${RESULT}})
message(STATUS "Current date : ${RESULT_DAY} / ${RESULT_MONTH} / ${RESULT_YEAR}")
else()
message(SEND_ERROR "date not implemented")
add_definitions( -DBUILD_DAY=0 )
add_definitions( -DBUILD_YEAR=0 )
add_definitions( -DBUILD_MONTH=0 )
endif()
endif()
add_definitions( -DBUILD_HOUR=0 )
add_definitions( -DBUILD_MINUTE=0 )
add_definitions( -DBUILD_SECOND=0 )
#Create a static Lib:
add_library(date STATIC ${src_files} )

22
external/edtaa3/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 2.8)
# Declare the project
project(edtaa3)
# set output path:
set(LIBRARY_OUTPUT_PATH lib/${CMAKE_BUILD_TYPE})
include_directories(.)
#Create src file list
set(src_files
edtaa3/edtaa3func.c
)
add_definitions( -DDEBUG_LEVEL=3 )
add_definitions( -DDEBUG=1 )
#Create a static Lib:
add_library(edtaa3 STATIC ${src_files} )

2
external/egami vendored

@ -1 +1 @@
Subproject commit 9ed82e01ab2bf9147adcb0a238db764cea162214
Subproject commit 3d6f7d02238ba4b080ae0a9c568d0697eaf602b5

2
external/ejson vendored

@ -1 +1 @@
Subproject commit 8cca9d9ce2bed7715d3f6febb5f756728e515220
Subproject commit e1c8319249b3ed3e8eb1d2d9ed15a8ab22ca6619

2
external/esvg vendored

@ -1 +1 @@
Subproject commit f24b85275216f3a072a1e8c1bec33f3eabd10de7
Subproject commit eceec1d9289fc3234ad97842b4bfb3dddd3a858b

2
external/etk vendored

@ -1 +1 @@
Subproject commit 48448f465dcdda58a94bd0a373244465c21e70dd
Subproject commit 041266c5f968460c07758938bb6cca92fd295db1

2
external/exml vendored

@ -1 +1 @@
Subproject commit 4b66ba43741c05d9ec8c2e644f90fd07fb9c9474
Subproject commit c9097dcae712c4a2df984251ac355ce4951ac2ee

2
external/freetype vendored

@ -1 +1 @@
Subproject commit 643eeae79f7238751832ef8434c0278745c4f673
Subproject commit 389efe5175c27fb925fc3618202b9adb6975a513

2
external/png vendored

@ -1 +1 @@
Subproject commit 6e0a9a2e2d428f3270a59010a5241db0e46d1196
Subproject commit c0d9b148c08d28a1707959f6d425bc8bb93da895

144
sources/CMakeLists.txt Normal file
View File

@ -0,0 +1,144 @@
cmake_minimum_required(VERSION 2.8)
# Declare the project
project(ewol)
##
## Include C++ X11 dependency ... (check correct flags)
##
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else()
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
endif()
# set output path:
set(LIBRARY_OUTPUT_PATH lib/${CMAKE_BUILD_TYPE})
include_directories(.)
#Create src file list
set(src_files
ewol/ewol.cpp
ewol/debug.cpp
ewol/Dimension.cpp
ewol/compositing/Compositing.cpp
ewol/compositing/TextBase.cpp
ewol/compositing/Text.cpp
ewol/compositing/TextDF.cpp
ewol/compositing/Drawing.cpp
ewol/compositing/Image.cpp
ewol/compositing/Sprite.cpp
ewol/compositing/Shaper.cpp
ewol/compositing/Area.cpp
ewol/context/clipBoard.cpp
ewol/context/commandLine.cpp
ewol/context/ConfigFont.cpp
ewol/context/Context.cpp
ewol/context/cursor.cpp
ewol/context/InputManager.cpp
ewol/context/X11/Context.cpp
ewol/event/Entry.cpp
ewol/event/Time.cpp
ewol/event/Input.cpp
ewol/key/keyboard.cpp
ewol/key/Special.cpp
ewol/key/status.cpp
ewol/key/type.cpp
ewol/object/Config.cpp
ewol/object/ConfigElement.cpp
ewol/object/Manager.cpp
ewol/object/Message.cpp
ewol/object/MultiCast.cpp
ewol/object/Object.cpp
ewol/openGL/openGL.cpp
ewol/resource/Colored3DObject.cpp
ewol/resource/ColorFile.cpp
ewol/resource/ConfigFile.cpp
ewol/resource/FontFreeType.cpp
ewol/resource/Image.cpp
ewol/resource/ImageDF.cpp
ewol/resource/Manager.cpp
ewol/resource/Program.cpp
ewol/resource/Resource.cpp
ewol/resource/Shader.cpp
ewol/resource/Texture.cpp
ewol/resource/TexturedFont.cpp
ewol/resource/DistanceFieldFont.cpp
ewol/resource/VirtualBufferObject.cpp
ewol/widget/ButtonColor.cpp
ewol/widget/Button.cpp
ewol/widget/CheckBox.cpp
ewol/widget/ColorBar.cpp
ewol/widget/Composer.cpp
ewol/widget/Container.cpp
ewol/widget/Container2.cpp
ewol/widget/ContainerN.cpp
ewol/widget/ContextMenu.cpp
ewol/widget/Entry.cpp
ewol/widget/Gird.cpp
ewol/widget/Image.cpp
ewol/widget/Joystick.cpp
ewol/widget/Label.cpp
ewol/widget/Layer.cpp
ewol/widget/List.cpp
ewol/widget/ListFileSystem.cpp
ewol/widget/Manager.cpp
ewol/widget/Menu.cpp
ewol/widget/meta/ColorChooser.cpp
ewol/widget/meta/FileChooser.cpp
ewol/widget/meta/Parameter.cpp
ewol/widget/meta/ParameterList.cpp
ewol/widget/meta/StdPopUp.cpp
ewol/widget/PopUp.cpp
ewol/widget/ProgressBar.cpp
ewol/widget/Scroll.cpp
ewol/widget/Sizer.cpp
ewol/widget/Slider.cpp
ewol/widget/Spacer.cpp
ewol/widget/Widget.cpp
ewol/widget/WidgetScrolled.cpp
ewol/widget/Windows.cpp
ewol/widget/WSlider.cpp
)
add_definitions( -DDEBUG_LEVEL=3 )
add_definitions( -DDEBUG=1 )
#Create a static Lib:
add_library(ewol STATIC ${src_files} )
include_directories(${zlib_SOURCE_DIR}/contrib/)
include_directories(${linearmath_SOURCE_DIR}/bullet/src/)
include_directories(${etk_SOURCE_DIR})
include_directories(${freetype_SOURCE_DIR})
include_directories(${exml_SOURCE_DIR})
include_directories(${ejson_SOURCE_DIR})
include_directories(${egami_SOURCE_DIR})
include_directories(${edtaa3_SOURCE_DIR})
include_directories(${date_SOURCE_DIR})
include_directories(${agg_SOURCE_DIR})
#add_dependencies(ewol linearmath zlib etk freetype exml ejson egami edtaa3 date)
target_link_libraries(ewol linearmath zlib etk freetype exml ejson egami edtaa3 date)
# read version :
file (STRINGS "tag" BUILD_VERSION)
add_definitions( -DEWOL_VERSION="${BUILD_VERSION}" )
add_definitions( -D__TARGET_OS__Linux )
# display all variable ...
#get_cmake_property(_variableNames VARIABLES)
#foreach (_variableName ${_variableNames})
# message(STATUS "${_variableName}=${${_variableName}}")
#endforeach()