[DEV] uptate new lutin declaration model
This commit is contained in:
parent
9bf5d63869
commit
6abc93a721
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,2 +1,7 @@
|
||||
__pycache__
|
||||
.bck
|
||||
out
|
||||
target
|
||||
build
|
||||
*.pyc
|
||||
build/
|
||||
build/
|
||||
|
29
etest/GLD_etest.json
Normal file
29
etest/GLD_etest.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"type":"LIBRARY",
|
||||
"group-id":"com.atria-soft",
|
||||
"description":"Ewol tool kit (test: test framework)",
|
||||
"license":"MPL-2",
|
||||
"license-file":"file://../LICENCE.txt",
|
||||
"maintainer":"file://../authors.txt",
|
||||
"author":"file://../authors.txt",
|
||||
"version":"file://../version.txt",
|
||||
|
||||
"source": [
|
||||
"etest/etest.cpp",
|
||||
"etest/debug.cpp"
|
||||
],
|
||||
"header": [
|
||||
"etest/etest.hpp",
|
||||
"etest/debug.hpp"
|
||||
],
|
||||
"path":[
|
||||
"."
|
||||
],
|
||||
"dependency": [
|
||||
"etk-core",
|
||||
"echrono",
|
||||
"elog",
|
||||
"cxx"
|
||||
]
|
||||
}
|
||||
|
@ -1,53 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
import realog.debug as debug
|
||||
import lutin.tools as tools
|
||||
|
||||
|
||||
def get_type():
|
||||
return "LIBRARY"
|
||||
|
||||
def get_desc():
|
||||
return "Ewol tool kit (test: test framework)"
|
||||
|
||||
def get_licence():
|
||||
return "MPL-2"
|
||||
|
||||
def get_compagny_type():
|
||||
return "com"
|
||||
|
||||
def get_compagny_name():
|
||||
return "atria-soft"
|
||||
|
||||
def get_maintainer():
|
||||
return "../authors.txt"
|
||||
|
||||
def get_version():
|
||||
return "../version.txt"
|
||||
|
||||
def configure(target, my_module):
|
||||
my_module.add_extra_flags()
|
||||
# add the file to compile:
|
||||
my_module.add_src_file([
|
||||
'etest/etest.cpp',
|
||||
'etest/debug.cpp',
|
||||
])
|
||||
|
||||
my_module.add_header_file([
|
||||
'etest/etest.hpp',
|
||||
'etest/debug.hpp',
|
||||
])
|
||||
|
||||
# build in C++ mode
|
||||
my_module.compile_version("c++", 2017)
|
||||
# add dependency of the generic C++ library:
|
||||
my_module.add_depend([
|
||||
'etk-core',
|
||||
'echrono',
|
||||
'elog',
|
||||
'cxx'
|
||||
])
|
||||
|
||||
my_module.add_path(".")
|
||||
return True
|
||||
|
||||
|
@ -1,230 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
if (WIN32)
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
else()
|
||||
set(CPACK_GENERATOR "TGZ")
|
||||
endif()
|
||||
set(CPACK_VERBATIM_VARIABLES YES)
|
||||
include(CPack)
|
||||
|
||||
function(json_get_list OUT_VAR INPUT_JSON VARIABLE)
|
||||
string(JSON LIST_JSON_ELEMENTS ERROR_VARIABLE ${VARIABLE} GET ${INPUT_JSON} ${VARIABLE})
|
||||
if (${LIST_JSON_ELEMENTS} EQUAL ${VARIABLE}-NOTFOUND)
|
||||
set("${OUT_VAR}" PARENT_SCOPE)
|
||||
retrun()
|
||||
endif()
|
||||
#message("LIST_JSON_ELEMENTS : ${LIST_JSON_ELEMENTS}")
|
||||
|
||||
string(JSON LENGTH_VALUE LENGTH ${LIST_JSON_ELEMENTS})
|
||||
#message("LENGTH_VALUE : ${LENGTH_VALUE}")
|
||||
if (${LENGTH_VALUE} EQUAL 0)
|
||||
set("${OUT_VAR}" PARENT_SCOPE)
|
||||
retrun()
|
||||
endif()
|
||||
set(OUT_LIST)
|
||||
MATH(EXPR LENGTH_VALUE "${LENGTH_VALUE}-1")
|
||||
foreach(IDX RANGE ${LENGTH_VALUE})
|
||||
string(JSON ELEM GET ${LIST_JSON_ELEMENTS} ${IDX})
|
||||
#message(" - : ${ELEM}")
|
||||
list(APPEND OUT_LIST ${ELEM})
|
||||
endforeach()
|
||||
#message("OUT_LIST : ${OUT_LIST}")
|
||||
set("${OUT_VAR}" ${OUT_LIST} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
|
||||
function(json_get_element OUT_VAR INPUT_JSON VARIABLE)
|
||||
string(JSON ELEMENT ERROR_VARIABLE ${VARIABLE} GET ${INPUT_JSON} ${VARIABLE})
|
||||
if (${ELEMENT} EQUAL ${VARIABLE}-NOTFOUND)
|
||||
set("${OUT_VAR}" PARENT_SCOPE)
|
||||
retrun()
|
||||
endif()
|
||||
set("${OUT_VAR}" ${ELEMENT} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
|
||||
# add the executable
|
||||
# add_executable(Tutorial tutorial.cxx)
|
||||
|
||||
set(LIBRARY_NAME "etk-core")
|
||||
set_property(
|
||||
DIRECTORY
|
||||
APPEND
|
||||
PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/GLD_${LIBRARY_NAME}.json
|
||||
)
|
||||
# Read the JSON file.
|
||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/GLD_${LIBRARY_NAME}.json MY_JSON_STRING)
|
||||
|
||||
# Loop through each element of the JSON array (indices 0 though 1).
|
||||
|
||||
json_get_element(LIBRARY_TYPE ${MY_JSON_STRING} "type")
|
||||
json_get_element(LIBRARY_GROUP_ID ${MY_JSON_STRING} "group-id")
|
||||
json_get_element(LIBRARY_DECRIPTION ${MY_JSON_STRING} "description")
|
||||
json_get_element(LIBRARY_LICENCE ${MY_JSON_STRING} "licence")
|
||||
json_get_element(LIBRARY_LICENCE_FILE ${MY_JSON_STRING} "licence-file")
|
||||
json_get_element(LIBRARY_MAINTAINER ${MY_JSON_STRING} "maintainer")
|
||||
json_get_element(LIBRARY_AUTHORS ${MY_JSON_STRING} "authors")
|
||||
json_get_element(LIBRARY_VERSION ${MY_JSON_STRING} "version")
|
||||
json_get_element(LIBRARY_SOURCES ${MY_JSON_STRING} "sources")
|
||||
json_get_element(LIBRARY_HEADERS ${MY_JSON_STRING} "headers")
|
||||
json_get_list(LIBRARY_PATH ${MY_JSON_STRING} "path")
|
||||
json_get_element(LIBRARY_COMPILATION_VERSION ${MY_JSON_STRING} "compilation-version")
|
||||
json_get_list(LIBRARY_DEPENDENCY ${MY_JSON_STRING} "dependency")
|
||||
json_get_element(LIBRARY_PLATFORM ${MY_JSON_STRING} "platform")
|
||||
|
||||
json_get_element(LIBRARY_COMPILATION_VERSION_LANGUAGE ${MY_JSON_STRING} "language")
|
||||
json_get_element(LIBRARY_COMPILATION_VERSION_VALUE ${MY_JSON_STRING} "version")
|
||||
|
||||
message("LIBRARY_NAME : ${LIBRARY_NAME}")
|
||||
message("LIBRARY_TYPE : ${LIBRARY_TYPE}")
|
||||
message("LIBRARY_GROUP_ID : ${LIBRARY_GROUP_ID}")
|
||||
message("LIBRARY_DECRIPTION : ${LIBRARY_DECRIPTION}")
|
||||
message("LIBRARY_LICENCE : ${LIBRARY_LICENCE}")
|
||||
message("LIBRARY_LICENCE_FILE : ${LIBRARY_LICENCE_FILE}")
|
||||
message("LIBRARY_MAINTAINER : ${LIBRARY_MAINTAINER}")
|
||||
message("LIBRARY_AUTHORS : ${LIBRARY_AUTHORS}")
|
||||
message("LIBRARY_VERSION : ${LIBRARY_VERSION}")
|
||||
message("LIBRARY_COMPILATION_VERSION : ${LIBRARY_COMPILATION_VERSION_LANGUAGE} : ${LIBRARY_COMPILATION_VERSION_VALUE}")
|
||||
|
||||
#message("LIBRARY_SOURCES: ${LIBRARY_SOURCES}")
|
||||
#message("LIBRARY_HEADERS: ${LIBRARY_HEADERS}")
|
||||
message("LIBRARY_PATH: ${LIBRARY_PATH}")
|
||||
#message("LIBRARY_COMPILATION_VERSION: ${LIBRARY_COMPILATION_VERSION}")
|
||||
message("LIBRARY_DEPENDENCY: ${LIBRARY_DEPENDENCY}")
|
||||
#message("LIBRARY_PLATFORM: ${LIBRARY_PLATFORM}")
|
||||
|
||||
|
||||
json_get_list(SOURCES_LIST ${LIBRARY_SOURCES} "list")
|
||||
message("SOURCES_LIST: ${SOURCES_LIST}")
|
||||
|
||||
json_get_list(EXPORT_HEADER_LIST ${LIBRARY_HEADERS} "list")
|
||||
json_get_element(EXPORT_HEADER_LIST_PATH ${LIBRARY_HEADERS} "destination-path")
|
||||
message("EXPORT_HEADER_LIST: ${EXPORT_HEADER_LIST}")
|
||||
message("EXPORT_HEADER_LIST_PATH: ${EXPORT_HEADER_LIST_PATH}")
|
||||
|
||||
|
||||
|
||||
string(JSON LIBRARY_PLOP ERROR_VARIABLE "qsdfqsdfqsdf" GET ${MY_JSON_STRING} "qsdfqsdfqsdf")
|
||||
#string(JSON LIBRARY_MEMBERS MEMBER ${MY_JSON_STRING} )
|
||||
#message("LIBRARY_MEMBERS : ${LIBRARY_MEMBERS}")
|
||||
message("LIBRARY_PLOP : ${LIBRARY_PLOP}")
|
||||
|
||||
string(REPLACE "-" "_" LIBRARY_NAME222 ${LIBRARY_NAME})
|
||||
set(LIBRARY_NAME222 ${LIBRARY_NAME})
|
||||
project(${LIBRARY_NAME222} VERSION ${LIBRARY_VERSION})
|
||||
set(${LIBRARY_NAME222} PROPERTIES CPACK_PACKAGE_VERSION ${LIBRARY_VERSION})
|
||||
add_library(${LIBRARY_NAME222}_OBJ OBJECT ${SOURCES_LIST})
|
||||
# shared libraries need PIC
|
||||
set_property(TARGET ${LIBRARY_NAME222}_OBJ PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||
|
||||
|
||||
#set_target_properties(${LIBRARY_NAME222} PROPERTIES PUBLIC_HEADER ${EXPORT_HEADER_LIST})
|
||||
target_include_directories(${LIBRARY_NAME222}_OBJ PUBLIC
|
||||
${LIBRARY_PATH}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
add_library(${LIBRARY_NAME222}_dynamic SHARED $<TARGET_OBJECTS:${LIBRARY_NAME222}_OBJ>)
|
||||
add_library(${LIBRARY_NAME222}_static STATIC $<TARGET_OBJECTS:${LIBRARY_NAME222}_OBJ>)
|
||||
|
||||
set_target_properties(${LIBRARY_NAME222}_dynamic PROPERTIES OUTPUT_NAME ${LIBRARY_NAME222})
|
||||
if (NOT WIN32)
|
||||
set_target_properties(${LIBRARY_NAME222}_static PROPERTIES OUTPUT_NAME ${LIBRARY_NAME222})
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
set_target_properties(${LIBRARY_NAME222}_dynamic PROPERTIES VERSION ${LIBRARY_VERSION})
|
||||
set_target_properties(${LIBRARY_NAME222}_dynamic PROPERTIES SOVERSION ${LIBRARY_VERSION})
|
||||
set_target_properties(${LIBRARY_NAME222}_dynamic PROPERTIES DESCRIPTION ${LIBRARY_DECRIPTION})
|
||||
|
||||
# install dynamic & static library
|
||||
install(TARGETS ${LIBRARY_NAME222}_dynamic EXPORT ${LIBRARY_NAME222}Targets
|
||||
RUNTIME DESTINATION lib
|
||||
)
|
||||
install(TARGETS ${LIBRARY_NAME222}_static
|
||||
RUNTIME DESTINATION lib)
|
||||
|
||||
|
||||
#install(TARGETS ${LIBRARY_NAME222} EXPORT ${LIBRARY_NAME222}Targets
|
||||
# LIBRARY DESTINATION lib
|
||||
# ARCHIVE DESTINATION lib
|
||||
# RUNTIME DESTINATION bin
|
||||
# INCLUDES DESTINATION include
|
||||
#)
|
||||
# install exported headers
|
||||
# this copy all the headers in a single folder:
|
||||
#install(FILES ${EXPORT_HEADER_LIST} DESTINATION include)
|
||||
# this keep the basic path for each folders:
|
||||
set(BASE "${PROJECT_SOURCE_DIR}/install")
|
||||
foreach(ITEM ${EXPORT_HEADER_LIST})
|
||||
get_filename_component(ITEM_PATH ${ITEM} PATH)
|
||||
string(REPLACE ${BASE} "" ITEM_PATH ${ITEM_PATH})
|
||||
install(FILES ${ITEM}
|
||||
DESTINATION "include/${ITEM_PATH}"
|
||||
COMPONENT Devel)
|
||||
endforeach()
|
||||
|
||||
|
||||
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
#write_basic_package_version_file(
|
||||
# "${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME222}/${LIBRARY_NAME222}ConfigVersion.cmake"
|
||||
# VERSION ${LIBRARY_VERSION}
|
||||
# COMPATIBILITY AnyNewerVersion
|
||||
#)
|
||||
#
|
||||
#export(EXPORT ${LIBRARY_NAME222}Targets
|
||||
# FILE "${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME222}/${LIBRARY_NAME222}Targets.cmake"
|
||||
# NAMESPACE Upstream::
|
||||
#)
|
||||
##configure_file(cmake/${LIBRARY_NAME222}Config.cmake
|
||||
## "${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME222}/${LIBRARY_NAME222}Config.cmake"
|
||||
## COPYONLY
|
||||
##)
|
||||
|
||||
set(CONFIG_PACKAGE_LOCATION cmake/${LIBRARY_NAME222})
|
||||
install(EXPORT ${LIBRARY_NAME222}Targets
|
||||
FILE
|
||||
${LIBRARY_NAME222}Targets.cmake
|
||||
NAMESPACE
|
||||
${LIBRARY_NAME222}::
|
||||
DESTINATION
|
||||
${CONFIG_PACKAGE_LOCATION}
|
||||
)
|
||||
#install(
|
||||
# FILES
|
||||
# cmake/${LIBRARY_NAME222}Config.cmake
|
||||
# "${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME222}/${LIBRARY_NAME222}ConfigVersion.cmake"
|
||||
# DESTINATION
|
||||
# ${CONFIG_PACKAGE_LOCATION}
|
||||
# COMPONENT
|
||||
# Devel
|
||||
#)
|
||||
message("CMAKE_INSTALL_LIBDIR===${CMAKE_INSTALL_LIBDIR}")
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
configure_package_config_file(cmake/${LIBRARY_NAME222}Config.cmake.in
|
||||
"${PROJECT_BINARY_DIR}/${LIBRARY_NAME222}Config.cmake"
|
||||
INSTALL_DESTINATION ${CONFIG_PACKAGE_LOCATION}
|
||||
NO_SET_AND_CHECK_MACRO
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
|
||||
write_basic_package_version_file(
|
||||
"${PROJECT_BINARY_DIR}/${LIBRARY_NAME222}ConfigVersion.cmake"
|
||||
VERSION ${LIBRARY_VERSION}
|
||||
COMPATIBILITY SameMajorVersion)
|
||||
install(
|
||||
FILES
|
||||
"${PROJECT_BINARY_DIR}/${LIBRARY_NAME222}Config.cmake"
|
||||
"${PROJECT_BINARY_DIR}/${LIBRARY_NAME222}ConfigVersion.cmake"
|
||||
DESTINATION ${CONFIG_PACKAGE_LOCATION}
|
||||
COMPONENT Devel)
|
||||
|
||||
|
||||
include(GLDBuilder)
|
||||
|
||||
GLD_import("./" "etk-core")
|
||||
|
||||
GLD_instanciate()
|
235
etk-core/GLDBuilder.cmake
Normal file
235
etk-core/GLDBuilder.cmake
Normal file
@ -0,0 +1,235 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
if (WIN32)
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
else()
|
||||
set(CPACK_GENERATOR "TGZ")
|
||||
endif()
|
||||
set(CPACK_VERBATIM_VARIABLES YES)
|
||||
include(CPack)
|
||||
|
||||
function(json_get_list OUT_VAR INPUT_JSON VARIABLE)
|
||||
string(JSON LIST_JSON_ELEMENTS ERROR_VARIABLE ${VARIABLE} GET ${INPUT_JSON} ${VARIABLE})
|
||||
if (${LIST_JSON_ELEMENTS} EQUAL ${VARIABLE}-NOTFOUND)
|
||||
set("${OUT_VAR}" PARENT_SCOPE)
|
||||
retrun()
|
||||
endif()
|
||||
#message("LIST_JSON_ELEMENTS : ${LIST_JSON_ELEMENTS}")
|
||||
|
||||
string(JSON LENGTH_VALUE LENGTH ${LIST_JSON_ELEMENTS})
|
||||
#message("LENGTH_VALUE : ${LENGTH_VALUE}")
|
||||
if (${LENGTH_VALUE} EQUAL 0)
|
||||
set("${OUT_VAR}" PARENT_SCOPE)
|
||||
retrun()
|
||||
endif()
|
||||
set(OUT_LIST)
|
||||
MATH(EXPR LENGTH_VALUE "${LENGTH_VALUE}-1")
|
||||
foreach(IDX RANGE ${LENGTH_VALUE})
|
||||
string(JSON ELEM GET ${LIST_JSON_ELEMENTS} ${IDX})
|
||||
#message(" - : ${ELEM}")
|
||||
list(APPEND OUT_LIST ${ELEM})
|
||||
endforeach()
|
||||
#message("OUT_LIST : ${OUT_LIST}")
|
||||
set("${OUT_VAR}" ${OUT_LIST} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
|
||||
function(json_get_element OUT_VAR INPUT_JSON VARIABLE)
|
||||
string(JSON ELEMENT ERROR_VARIABLE ${VARIABLE} GET ${INPUT_JSON} ${VARIABLE})
|
||||
if (${ELEMENT} EQUAL ${VARIABLE}-NOTFOUND)
|
||||
set("${OUT_VAR}" PARENT_SCOPE)
|
||||
retrun()
|
||||
endif()
|
||||
set("${OUT_VAR}" ${ELEMENT} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
|
||||
function(GLD_import FOLDER LIBRARY_NAME)
|
||||
# add the executable
|
||||
# add_executable(Tutorial tutorial.cxx)
|
||||
|
||||
set(LIBRARY_NAME "etk-core")
|
||||
set_property(
|
||||
DIRECTORY
|
||||
APPEND
|
||||
PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/GLD_${LIBRARY_NAME}.json
|
||||
)
|
||||
# Read the JSON file.
|
||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/GLD_${LIBRARY_NAME}.json MY_JSON_STRING)
|
||||
|
||||
# Loop through each element of the JSON array (indices 0 though 1).
|
||||
|
||||
json_get_element(LIBRARY_TYPE ${MY_JSON_STRING} "type")
|
||||
json_get_element(LIBRARY_GROUP_ID ${MY_JSON_STRING} "group-id")
|
||||
json_get_element(LIBRARY_DECRIPTION ${MY_JSON_STRING} "description")
|
||||
json_get_element(LIBRARY_LICENCE ${MY_JSON_STRING} "licence")
|
||||
json_get_element(LIBRARY_LICENCE_FILE ${MY_JSON_STRING} "licence-file")
|
||||
json_get_element(LIBRARY_MAINTAINER ${MY_JSON_STRING} "maintainer")
|
||||
json_get_element(LIBRARY_AUTHORS ${MY_JSON_STRING} "authors")
|
||||
json_get_element(LIBRARY_VERSION ${MY_JSON_STRING} "version")
|
||||
json_get_element(LIBRARY_SOURCES ${MY_JSON_STRING} "sources")
|
||||
json_get_element(LIBRARY_HEADERS ${MY_JSON_STRING} "headers")
|
||||
json_get_list(LIBRARY_PATH ${MY_JSON_STRING} "path")
|
||||
json_get_element(LIBRARY_COMPILATION_VERSION ${MY_JSON_STRING} "compilation-version")
|
||||
json_get_list(LIBRARY_DEPENDENCY ${MY_JSON_STRING} "dependency")
|
||||
json_get_element(LIBRARY_PLATFORM ${MY_JSON_STRING} "platform")
|
||||
|
||||
json_get_element(LIBRARY_COMPILATION_VERSION_LANGUAGE ${MY_JSON_STRING} "language")
|
||||
json_get_element(LIBRARY_COMPILATION_VERSION_VALUE ${MY_JSON_STRING} "version")
|
||||
|
||||
message("LIBRARY_NAME : ${LIBRARY_NAME}")
|
||||
message("LIBRARY_TYPE : ${LIBRARY_TYPE}")
|
||||
message("LIBRARY_GROUP_ID : ${LIBRARY_GROUP_ID}")
|
||||
message("LIBRARY_DECRIPTION : ${LIBRARY_DECRIPTION}")
|
||||
message("LIBRARY_LICENCE : ${LIBRARY_LICENCE}")
|
||||
message("LIBRARY_LICENCE_FILE : ${LIBRARY_LICENCE_FILE}")
|
||||
message("LIBRARY_MAINTAINER : ${LIBRARY_MAINTAINER}")
|
||||
message("LIBRARY_AUTHORS : ${LIBRARY_AUTHORS}")
|
||||
message("LIBRARY_VERSION : ${LIBRARY_VERSION}")
|
||||
message("LIBRARY_COMPILATION_VERSION : ${LIBRARY_COMPILATION_VERSION_LANGUAGE} : ${LIBRARY_COMPILATION_VERSION_VALUE}")
|
||||
|
||||
#message("LIBRARY_SOURCES: ${LIBRARY_SOURCES}")
|
||||
#message("LIBRARY_HEADERS: ${LIBRARY_HEADERS}")
|
||||
message("LIBRARY_PATH: ${LIBRARY_PATH}")
|
||||
#message("LIBRARY_COMPILATION_VERSION: ${LIBRARY_COMPILATION_VERSION}")
|
||||
message("LIBRARY_DEPENDENCY: ${LIBRARY_DEPENDENCY}")
|
||||
#message("LIBRARY_PLATFORM: ${LIBRARY_PLATFORM}")
|
||||
|
||||
|
||||
json_get_list(SOURCES_LIST ${LIBRARY_SOURCES} "list")
|
||||
message("SOURCES_LIST: ${SOURCES_LIST}")
|
||||
|
||||
json_get_list(EXPORT_HEADER_LIST ${LIBRARY_HEADERS} "list")
|
||||
json_get_element(EXPORT_HEADER_LIST_PATH ${LIBRARY_HEADERS} "destination-path")
|
||||
message("EXPORT_HEADER_LIST: ${EXPORT_HEADER_LIST}")
|
||||
message("EXPORT_HEADER_LIST_PATH: ${EXPORT_HEADER_LIST_PATH}")
|
||||
|
||||
|
||||
|
||||
string(JSON LIBRARY_PLOP ERROR_VARIABLE "qsdfqsdfqsdf" GET ${MY_JSON_STRING} "qsdfqsdfqsdf")
|
||||
#string(JSON LIBRARY_MEMBERS MEMBER ${MY_JSON_STRING} )
|
||||
#message("LIBRARY_MEMBERS : ${LIBRARY_MEMBERS}")
|
||||
message("LIBRARY_PLOP : ${LIBRARY_PLOP}")
|
||||
|
||||
string(REPLACE "-" "_" LIBRARY_NAME222 ${LIBRARY_NAME})
|
||||
set(LIBRARY_NAME222 ${LIBRARY_NAME})
|
||||
project(${LIBRARY_NAME222} VERSION ${LIBRARY_VERSION})
|
||||
set(${LIBRARY_NAME222} PROPERTIES CPACK_PACKAGE_VERSION ${LIBRARY_VERSION})
|
||||
add_library(${LIBRARY_NAME222}_OBJ OBJECT ${SOURCES_LIST})
|
||||
# shared libraries need PIC
|
||||
set_property(TARGET ${LIBRARY_NAME222}_OBJ PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||
|
||||
|
||||
#set_target_properties(${LIBRARY_NAME222} PROPERTIES PUBLIC_HEADER ${EXPORT_HEADER_LIST})
|
||||
target_include_directories(${LIBRARY_NAME222}_OBJ PUBLIC
|
||||
${LIBRARY_PATH}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
add_library(${LIBRARY_NAME222}_dynamic SHARED $<TARGET_OBJECTS:${LIBRARY_NAME222}_OBJ>)
|
||||
add_library(${LIBRARY_NAME222}_static STATIC $<TARGET_OBJECTS:${LIBRARY_NAME222}_OBJ>)
|
||||
|
||||
set_target_properties(${LIBRARY_NAME222}_dynamic PROPERTIES OUTPUT_NAME ${LIBRARY_NAME222})
|
||||
if (NOT WIN32)
|
||||
set_target_properties(${LIBRARY_NAME222}_static PROPERTIES OUTPUT_NAME ${LIBRARY_NAME222})
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
set_target_properties(${LIBRARY_NAME222}_dynamic PROPERTIES VERSION ${LIBRARY_VERSION})
|
||||
set_target_properties(${LIBRARY_NAME222}_dynamic PROPERTIES SOVERSION ${LIBRARY_VERSION})
|
||||
set_target_properties(${LIBRARY_NAME222}_dynamic PROPERTIES DESCRIPTION ${LIBRARY_DECRIPTION})
|
||||
|
||||
# install dynamic & static library
|
||||
install(TARGETS ${LIBRARY_NAME222}_dynamic EXPORT ${LIBRARY_NAME222}Targets
|
||||
RUNTIME DESTINATION lib
|
||||
)
|
||||
install(TARGETS ${LIBRARY_NAME222}_static
|
||||
RUNTIME DESTINATION lib)
|
||||
|
||||
|
||||
#install(TARGETS ${LIBRARY_NAME222} EXPORT ${LIBRARY_NAME222}Targets
|
||||
# LIBRARY DESTINATION lib
|
||||
# ARCHIVE DESTINATION lib
|
||||
# RUNTIME DESTINATION bin
|
||||
# INCLUDES DESTINATION include
|
||||
#)
|
||||
# install exported headers
|
||||
# this copy all the headers in a single folder:
|
||||
#install(FILES ${EXPORT_HEADER_LIST} DESTINATION include)
|
||||
# this keep the basic path for each folders:
|
||||
set(BASE "${PROJECT_SOURCE_DIR}/install")
|
||||
foreach(ITEM ${EXPORT_HEADER_LIST})
|
||||
get_filename_component(ITEM_PATH ${ITEM} PATH)
|
||||
string(REPLACE ${BASE} "" ITEM_PATH ${ITEM_PATH})
|
||||
install(FILES ${ITEM}
|
||||
DESTINATION "include/${ITEM_PATH}"
|
||||
COMPONENT Devel)
|
||||
endforeach()
|
||||
|
||||
|
||||
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
#write_basic_package_version_file(
|
||||
# "${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME222}/${LIBRARY_NAME222}ConfigVersion.cmake"
|
||||
# VERSION ${LIBRARY_VERSION}
|
||||
# COMPATIBILITY AnyNewerVersion
|
||||
#)
|
||||
#
|
||||
#export(EXPORT ${LIBRARY_NAME222}Targets
|
||||
# FILE "${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME222}/${LIBRARY_NAME222}Targets.cmake"
|
||||
# NAMESPACE Upstream::
|
||||
#)
|
||||
##configure_file(cmake/${LIBRARY_NAME222}Config.cmake
|
||||
## "${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME222}/${LIBRARY_NAME222}Config.cmake"
|
||||
## COPYONLY
|
||||
##)
|
||||
|
||||
set(CONFIG_PACKAGE_LOCATION cmake/${LIBRARY_NAME222})
|
||||
install(EXPORT ${LIBRARY_NAME222}Targets
|
||||
FILE
|
||||
${LIBRARY_NAME222}Targets.cmake
|
||||
NAMESPACE
|
||||
${LIBRARY_NAME222}::
|
||||
DESTINATION
|
||||
${CONFIG_PACKAGE_LOCATION}
|
||||
)
|
||||
#install(
|
||||
# FILES
|
||||
# cmake/${LIBRARY_NAME222}Config.cmake
|
||||
# "${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME222}/${LIBRARY_NAME222}ConfigVersion.cmake"
|
||||
# DESTINATION
|
||||
# ${CONFIG_PACKAGE_LOCATION}
|
||||
# COMPONENT
|
||||
# Devel
|
||||
#)
|
||||
message("CMAKE_INSTALL_LIBDIR===${CMAKE_INSTALL_LIBDIR}")
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
configure_package_config_file(cmake/${LIBRARY_NAME222}Config.cmake.in
|
||||
"${PROJECT_BINARY_DIR}/${LIBRARY_NAME222}Config.cmake"
|
||||
INSTALL_DESTINATION ${CONFIG_PACKAGE_LOCATION}
|
||||
NO_SET_AND_CHECK_MACRO
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
|
||||
write_basic_package_version_file(
|
||||
"${PROJECT_BINARY_DIR}/${LIBRARY_NAME222}ConfigVersion.cmake"
|
||||
VERSION ${LIBRARY_VERSION}
|
||||
COMPATIBILITY SameMajorVersion)
|
||||
install(
|
||||
FILES
|
||||
"${PROJECT_BINARY_DIR}/${LIBRARY_NAME222}Config.cmake"
|
||||
"${PROJECT_BINARY_DIR}/${LIBRARY_NAME222}ConfigVersion.cmake"
|
||||
DESTINATION ${CONFIG_PACKAGE_LOCATION}
|
||||
COMPONENT Devel)
|
||||
|
||||
endfunction()
|
||||
|
||||
|
||||
function(GLD_instanciate)
|
||||
|
||||
endfunction()
|
||||
|
@ -2,53 +2,49 @@
|
||||
"type":"LIBRARY",
|
||||
"group-id":"com.atria-soft",
|
||||
"description":"Ewol tool kit (base: container)",
|
||||
"licence":"MPL-2",
|
||||
"licence-file":"file://LICENCE.txt",
|
||||
"maintainer":"Edouard DUPIN <yui.heero@gmail.com>",
|
||||
"authors":"file://../authors.txt",
|
||||
"version":"1.5.3",
|
||||
"__version":"file://../version.txt",
|
||||
"license":"MPL-2",
|
||||
"license-file":"file://../LICENCE.txt",
|
||||
"maintainer":"file://../authors.txt",
|
||||
"author":"file://../authors.txt",
|
||||
"version":"file://../version.txt",
|
||||
"code-quality":"MEDIUM",
|
||||
|
||||
|
||||
|
||||
"sources": {
|
||||
"list":[
|
||||
"etk/String.cpp",
|
||||
"etk/UString.cpp",
|
||||
"etk/utf8.cpp",
|
||||
"etk/stdTools.cpp",
|
||||
"etk/Stream.cpp",
|
||||
"etk/Function.cpp",
|
||||
"etk/Allocator.cpp",
|
||||
"etk/typeInfo.cpp",
|
||||
"etk/Exception.cpp",
|
||||
"etk/system.cpp"
|
||||
]
|
||||
},
|
||||
"headers": {
|
||||
"list": [
|
||||
"etk/algorithm.hpp",
|
||||
"etk/Allocator.hpp",
|
||||
"etk/types.hpp",
|
||||
"etk/stdTools.hpp",
|
||||
"etk/String.hpp",
|
||||
"etk/UString.hpp",
|
||||
"etk/utf8.hpp",
|
||||
"etk/Array.hpp",
|
||||
"etk/Vector.hpp",
|
||||
"etk/Stream.hpp",
|
||||
"etk/Pair.hpp",
|
||||
"etk/Map.hpp",
|
||||
"etk/Set.hpp",
|
||||
"etk/move.hpp",
|
||||
"etk/typeTrait.hpp",
|
||||
"etk/Function.hpp",
|
||||
"etk/NullPtr.hpp",
|
||||
"etk/typeInfo.hpp",
|
||||
"etk/Exception.hpp",
|
||||
"etk/system.hpp"
|
||||
]
|
||||
},
|
||||
"source": [
|
||||
"etk/String.cpp",
|
||||
"etk/UString.cpp",
|
||||
"etk/utf8.cpp",
|
||||
"etk/stdTools.cpp",
|
||||
"etk/Stream.cpp",
|
||||
"etk/Function.cpp",
|
||||
"etk/Allocator.cpp",
|
||||
"etk/typeInfo.cpp",
|
||||
"etk/Exception.cpp",
|
||||
"etk/system.cpp",
|
||||
"etk/Number.cpp"
|
||||
],
|
||||
"header": [
|
||||
"etk/algorithm.hpp",
|
||||
"etk/Allocator.hpp",
|
||||
"etk/types.hpp",
|
||||
"etk/stdTools.hpp",
|
||||
"etk/String.hpp",
|
||||
"etk/UString.hpp",
|
||||
"etk/utf8.hpp",
|
||||
"etk/Array.hpp",
|
||||
"etk/Vector.hpp",
|
||||
"etk/Stream.hpp",
|
||||
"etk/Pair.hpp",
|
||||
"etk/Map.hpp",
|
||||
"etk/Set.hpp",
|
||||
"etk/move.hpp",
|
||||
"etk/typeTrait.hpp",
|
||||
"etk/Function.hpp",
|
||||
"etk/NullPtr.hpp",
|
||||
"etk/typeInfo.hpp",
|
||||
"etk/Exception.hpp",
|
||||
"etk/system.hpp",
|
||||
"etk/Number.hpp"
|
||||
],
|
||||
"path":[
|
||||
"."
|
||||
],
|
||||
@ -61,19 +57,12 @@
|
||||
"m",
|
||||
"pthread"
|
||||
],
|
||||
|
||||
|
||||
"platform": {
|
||||
"target": {
|
||||
"Android": {
|
||||
"dependency": [
|
||||
"SDK"
|
||||
]
|
||||
"dependency": "SDK"
|
||||
},
|
||||
"MacOs": {
|
||||
"dependency": [
|
||||
"cxx"
|
||||
]
|
||||
"dependency": "cxx"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
64
etk-core/GLD_etk-test.json
Normal file
64
etk-core/GLD_etk-test.json
Normal file
@ -0,0 +1,64 @@
|
||||
{
|
||||
"type":"BINARY_SHARED",
|
||||
"group-id":"com.atria-soft",
|
||||
"description":"Ewol tool kit test software",
|
||||
"license":"MPL-2",
|
||||
"license-file":"file://../LICENCE.txt",
|
||||
"maintainer":"file://../authors.txt",
|
||||
"author":"file://../authors.txt",
|
||||
"version":"file://../version.txt",
|
||||
"code-quality":"MEDIUM",
|
||||
"source": [
|
||||
"test/main.cpp",
|
||||
"test/testFileSystem.cpp",
|
||||
"test/testPath.cpp",
|
||||
"test/testPermissions.cpp",
|
||||
"test/testTheme.cpp",
|
||||
"test/testUri.cpp",
|
||||
"test/testQuery.cpp",
|
||||
"test/testUriProvider.cpp",
|
||||
"test/ConstructDestruct.cpp",
|
||||
"test/testColor.cpp",
|
||||
"test/testFunction.cpp",
|
||||
"test/testMapUnordered.cpp",
|
||||
"test/testMap.cpp",
|
||||
"test/testSet.cpp",
|
||||
"test/testMatrix3x3.cpp",
|
||||
"test/testRegExp.cpp",
|
||||
"test/testTransform.cpp",
|
||||
"test/testArray.cpp",
|
||||
"test/testVector.cpp",
|
||||
"test/testVector3_f.cpp",
|
||||
"test/testMatrix2x2.cpp",
|
||||
"test/testQuaternion.cpp",
|
||||
"test/testVector2_f.cpp",
|
||||
"test/testString.cpp",
|
||||
"test/testTrait.cpp",
|
||||
"test/testThrow.cpp",
|
||||
"test/testUTF8.cpp"
|
||||
],
|
||||
"dependency": [
|
||||
"etk",
|
||||
"etest",
|
||||
"test-debug"
|
||||
],
|
||||
"copy": [
|
||||
{
|
||||
"path":"data/*",
|
||||
"to":""
|
||||
}, {
|
||||
"path":"data/data/*",
|
||||
"to":"data/"
|
||||
}, {
|
||||
"path":"data/data/dir_A/*",
|
||||
"to":"data/dir_A/"
|
||||
}, {
|
||||
"path":"data/data/dir_B/*",
|
||||
"to":"data/dir_B/"
|
||||
}, {
|
||||
"path":"data/data/dir_B/dir_C/*",
|
||||
"to":"data/dir_B/dir_C/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,88 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
import realog.debug as debug
|
||||
import lutin.tools as tools
|
||||
|
||||
|
||||
def get_type():
|
||||
return "LIBRARY"
|
||||
|
||||
def get_desc():
|
||||
return "Ewol tool kit (base: container)"
|
||||
|
||||
def get_licence():
|
||||
return "MPL-2"
|
||||
|
||||
def get_compagny_type():
|
||||
return "com"
|
||||
|
||||
def get_compagny_name():
|
||||
return "atria-soft"
|
||||
|
||||
def get_maintainer():
|
||||
return "../authors.txt"
|
||||
|
||||
def get_version():
|
||||
return "../version.txt"
|
||||
|
||||
def configure(target, my_module):
|
||||
my_module.add_extra_flags()
|
||||
# add the file to compile:
|
||||
my_module.add_src_file([
|
||||
'etk/String.cpp',
|
||||
'etk/UString.cpp',
|
||||
'etk/utf8.cpp',
|
||||
'etk/stdTools.cpp',
|
||||
'etk/Stream.cpp',
|
||||
'etk/Function.cpp',
|
||||
'etk/Allocator.cpp',
|
||||
'etk/typeInfo.cpp',
|
||||
'etk/Exception.cpp',
|
||||
'etk/system.cpp',
|
||||
'etk/Number.cpp',
|
||||
])
|
||||
|
||||
my_module.add_header_file([
|
||||
'etk/algorithm.hpp',
|
||||
'etk/Allocator.hpp',
|
||||
'etk/types.hpp',
|
||||
'etk/stdTools.hpp',
|
||||
'etk/String.hpp',
|
||||
'etk/UString.hpp',
|
||||
'etk/utf8.hpp',
|
||||
'etk/Array.hpp',
|
||||
'etk/Vector.hpp',
|
||||
'etk/Stream.hpp',
|
||||
'etk/Pair.hpp',
|
||||
'etk/Map.hpp',
|
||||
'etk/Set.hpp',
|
||||
'etk/move.hpp',
|
||||
'etk/typeTrait.hpp',
|
||||
'etk/Function.hpp',
|
||||
'etk/NullPtr.hpp',
|
||||
'etk/typeInfo.hpp',
|
||||
'etk/Exception.hpp',
|
||||
'etk/system.hpp',
|
||||
'etk/Number.hpp',
|
||||
], 'etk')
|
||||
|
||||
# build in C++ mode
|
||||
my_module.compile_version("c++", 2017)
|
||||
# add dependency of the generic C++ library:
|
||||
my_module.add_depend([
|
||||
'c',
|
||||
'm',
|
||||
"pthread",
|
||||
])
|
||||
"""
|
||||
my_module.add_flag('c++', [
|
||||
"-DETK_MEMORY_CHECKER=2"
|
||||
], export=True)
|
||||
"""
|
||||
if "Android" in target.get_type():
|
||||
my_module.add_depend("SDK")
|
||||
if "MacOs" in target.get_type():
|
||||
my_module.add_depend("cxx")
|
||||
my_module.add_path(".")
|
||||
return True
|
||||
|
||||
|
@ -1,68 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
import realog.debug as debug
|
||||
import lutin.tools as tools
|
||||
|
||||
|
||||
def get_type():
|
||||
return "BINARY_SHARED"
|
||||
|
||||
def get_sub_type():
|
||||
return "TEST"
|
||||
|
||||
def get_desc():
|
||||
return "e-tk test software"
|
||||
|
||||
def get_licence():
|
||||
return "MPL-2"
|
||||
|
||||
def get_compagny_type():
|
||||
return "com"
|
||||
|
||||
def get_compagny_name():
|
||||
return "atria-soft"
|
||||
|
||||
def get_maintainer():
|
||||
return "../authors.txt"
|
||||
|
||||
def configure(target, my_module):
|
||||
my_module.add_src_file([
|
||||
'test/main.cpp',
|
||||
'test/testFileSystem.cpp',
|
||||
'test/testPath.cpp',
|
||||
'test/testPermissions.cpp',
|
||||
'test/testTheme.cpp',
|
||||
'test/testUri.cpp',
|
||||
'test/testQuery.cpp',
|
||||
'test/testUriProvider.cpp',
|
||||
'test/ConstructDestruct.cpp',
|
||||
'test/testColor.cpp',
|
||||
'test/testFunction.cpp',
|
||||
'test/testMapUnordered.cpp',
|
||||
'test/testMap.cpp',
|
||||
'test/testSet.cpp',
|
||||
'test/testMatrix3x3.cpp',
|
||||
'test/testRegExp.cpp',
|
||||
'test/testTransform.cpp',
|
||||
'test/testArray.cpp',
|
||||
'test/testVector.cpp',
|
||||
'test/testVector3_f.cpp',
|
||||
'test/testMatrix2x2.cpp',
|
||||
'test/testQuaternion.cpp',
|
||||
'test/testVector2_f.cpp',
|
||||
'test/testString.cpp',
|
||||
'test/testTrait.cpp',
|
||||
'test/testThrow.cpp',
|
||||
'test/testUTF8.cpp',
|
||||
])
|
||||
my_module.add_depend([
|
||||
'etk',
|
||||
'etest',
|
||||
'test-debug'
|
||||
])
|
||||
my_module.copy_path('data/*')
|
||||
my_module.copy_path('data/data/*', 'data')
|
||||
my_module.copy_path('data/data/dir_A/*', 'data/dir_A')
|
||||
my_module.copy_path('data/data/dir_B/*', 'data/dir_B')
|
||||
my_module.copy_path('data/data/dir_B/dir_C/*', 'data/dir_B/dir_C')
|
||||
return True
|
||||
|
116
etk/GLD_etk.json
Normal file
116
etk/GLD_etk.json
Normal file
@ -0,0 +1,116 @@
|
||||
{
|
||||
"type":"LIBRARY",
|
||||
"group-id":"com.atria-soft",
|
||||
"description":"Ewol tool kit",
|
||||
"license":"MPL-2",
|
||||
"license-file":"file://../LICENCE.txt",
|
||||
"maintainer":"file://../authors.txt",
|
||||
"author":"file://../authors.txt",
|
||||
"version":"file://../version.txt",
|
||||
|
||||
"source": [
|
||||
"etk/debug.cpp",
|
||||
"etk/etk.cpp",
|
||||
"etk/tool.cpp",
|
||||
"etk/Noise.cpp",
|
||||
"etk/Color.cpp",
|
||||
"etk/RegEx.cpp",
|
||||
"etk/path/fileSystem.cpp",
|
||||
"etk/path/Path.cpp",
|
||||
"etk/path/Permissions.cpp",
|
||||
"etk/io/OpenMode.cpp",
|
||||
"etk/io/SeekMode.cpp",
|
||||
"etk/io/Interface.cpp",
|
||||
"etk/io/File.cpp",
|
||||
"etk/io/ZipFile.cpp",
|
||||
"etk/theme/theme.cpp",
|
||||
"etk/theme/ProviderTheme.cpp",
|
||||
"etk/math/Matrix2x2.cpp",
|
||||
"etk/math/Matrix2x3.cpp",
|
||||
"etk/math/Matrix3x3.cpp",
|
||||
"etk/math/Matrix4x4.cpp",
|
||||
"etk/math/Vector2D.cpp",
|
||||
"etk/math/Vector3D.cpp",
|
||||
"etk/math/Vector4D.cpp",
|
||||
"etk/math/Quaternion.cpp",
|
||||
"etk/math/Transform3D.cpp",
|
||||
"etk/archive/Archive.cpp",
|
||||
"etk/archive/Zip.cpp",
|
||||
"etk/uri/Uri.cpp",
|
||||
"etk/uri/uri.cpp",
|
||||
"etk/uri/Query.cpp",
|
||||
"etk/uri/provider/provider.cpp",
|
||||
"etk/uri/provider/Interface.cpp",
|
||||
"etk/uri/provider/ProviderFile.cpp",
|
||||
"etk/uri/provider/ProviderFileZip.cpp"
|
||||
],
|
||||
"header": [
|
||||
"etk/etk.hpp",
|
||||
"etk/debug.hpp",
|
||||
"etk/Buffer.hpp",
|
||||
"etk/tool.hpp",
|
||||
"etk/Noise.hpp",
|
||||
"etk/Color.hpp",
|
||||
"etk/RegEx.hpp",
|
||||
"etk/path/fileSystem.hpp",
|
||||
"etk/path/Path.hpp",
|
||||
"etk/path/Permissions.hpp",
|
||||
"etk/io/OpenMode.hpp",
|
||||
"etk/io/SeekMode.hpp",
|
||||
"etk/io/Interface.hpp",
|
||||
"etk/io/File.hpp",
|
||||
"etk/io/ZipFile.hpp",
|
||||
"etk/theme/theme.hpp",
|
||||
"etk/theme/ProviderTheme.hpp",
|
||||
"etk/math/Matrix2x2.hpp",
|
||||
"etk/math/Matrix2x3.hpp",
|
||||
"etk/math/Matrix3x3.hpp",
|
||||
"etk/math/Matrix4x4.hpp",
|
||||
"etk/math/Vector2D.hpp",
|
||||
"etk/math/Vector3D.hpp",
|
||||
"etk/math/Vector4D.hpp",
|
||||
"etk/math/Quaternion.hpp",
|
||||
"etk/math/Transform3D.hpp",
|
||||
"etk/os/Fifo.hpp",
|
||||
"etk/archive/Archive.hpp",
|
||||
"etk/archive/Zip.hpp",
|
||||
"etk/TreeNode.hpp",
|
||||
"etk/FlatTree.hpp",
|
||||
"etk/uri/Uri.hpp",
|
||||
"etk/uri/uri.hpp",
|
||||
"etk/uri/Query.hpp",
|
||||
"etk/uri/provider/provider.hpp",
|
||||
"etk/uri/provider/Interface.hpp",
|
||||
"etk/uri/provider/ProviderFile.hpp",
|
||||
"etk/uri/provider/ProviderFileZip.hpp"
|
||||
],
|
||||
"path":[
|
||||
"."
|
||||
],
|
||||
"compilation-version": {
|
||||
"language": "c++",
|
||||
"version": 2017
|
||||
},
|
||||
"dependency": [
|
||||
"c",
|
||||
"cxx",
|
||||
"m",
|
||||
"elog",
|
||||
"ememory",
|
||||
"etk-core",
|
||||
{
|
||||
"name":"minizip",
|
||||
"optional":true,
|
||||
"export":true
|
||||
}, {
|
||||
"name": "linearmath",
|
||||
"optional": true,
|
||||
"export": true,
|
||||
"flag": {
|
||||
"language": "c++",
|
||||
"value": "-DETK_BUILD_LINEARMATH"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
131
etk/lutin_etk.py
131
etk/lutin_etk.py
@ -1,131 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
import realog.debug as debug
|
||||
import lutin.tools as tools
|
||||
|
||||
|
||||
def get_type():
|
||||
return "LIBRARY"
|
||||
|
||||
def get_desc():
|
||||
return "Ewol tool kit"
|
||||
|
||||
def get_licence():
|
||||
return "MPL-2"
|
||||
|
||||
def get_compagny_type():
|
||||
return "com"
|
||||
|
||||
def get_compagny_name():
|
||||
return "atria-soft"
|
||||
|
||||
def get_maintainer():
|
||||
return "../authors.txt"
|
||||
|
||||
def get_version():
|
||||
return "../version.txt"
|
||||
|
||||
def configure(target, my_module):
|
||||
my_module.add_extra_flags()
|
||||
# add the file to compile:
|
||||
my_module.add_src_file([
|
||||
'etk/debug.cpp',
|
||||
'etk/etk.cpp',
|
||||
'etk/tool.cpp',
|
||||
'etk/Noise.cpp',
|
||||
'etk/Color.cpp',
|
||||
'etk/RegEx.cpp',
|
||||
'etk/path/fileSystem.cpp',
|
||||
'etk/path/Path.cpp',
|
||||
'etk/path/Permissions.cpp',
|
||||
'etk/io/OpenMode.cpp',
|
||||
'etk/io/SeekMode.cpp',
|
||||
'etk/io/Interface.cpp',
|
||||
'etk/io/File.cpp',
|
||||
'etk/io/ZipFile.cpp',
|
||||
'etk/theme/theme.cpp',
|
||||
'etk/theme/ProviderTheme.cpp',
|
||||
'etk/math/Matrix2x2.cpp',
|
||||
'etk/math/Matrix2x3.cpp',
|
||||
'etk/math/Matrix3x3.cpp',
|
||||
'etk/math/Matrix4x4.cpp',
|
||||
'etk/math/Vector2D.cpp',
|
||||
'etk/math/Vector3D.cpp',
|
||||
'etk/math/Vector4D.cpp',
|
||||
'etk/math/Quaternion.cpp',
|
||||
'etk/math/Transform3D.cpp',
|
||||
'etk/archive/Archive.cpp',
|
||||
'etk/archive/Zip.cpp',
|
||||
'etk/uri/Uri.cpp',
|
||||
'etk/uri/uri.cpp',
|
||||
'etk/uri/Query.cpp',
|
||||
'etk/uri/provider/provider.cpp',
|
||||
'etk/uri/provider/Interface.cpp',
|
||||
'etk/uri/provider/ProviderFile.cpp',
|
||||
'etk/uri/provider/ProviderFileZip.cpp',
|
||||
])
|
||||
|
||||
my_module.add_header_file([
|
||||
'etk/etk.hpp',
|
||||
'etk/debug.hpp',
|
||||
'etk/Buffer.hpp',
|
||||
'etk/tool.hpp',
|
||||
'etk/Noise.hpp',
|
||||
'etk/Color.hpp',
|
||||
'etk/RegEx.hpp',
|
||||
'etk/path/fileSystem.hpp',
|
||||
'etk/path/Path.hpp',
|
||||
'etk/path/Permissions.hpp',
|
||||
'etk/io/OpenMode.hpp',
|
||||
'etk/io/SeekMode.hpp',
|
||||
'etk/io/Interface.hpp',
|
||||
'etk/io/File.hpp',
|
||||
'etk/io/ZipFile.hpp',
|
||||
'etk/theme/theme.hpp',
|
||||
'etk/theme/ProviderTheme.hpp',
|
||||
'etk/math/Matrix2x2.hpp',
|
||||
'etk/math/Matrix2x3.hpp',
|
||||
'etk/math/Matrix3x3.hpp',
|
||||
'etk/math/Matrix4x4.hpp',
|
||||
'etk/math/Vector2D.hpp',
|
||||
'etk/math/Vector3D.hpp',
|
||||
'etk/math/Vector4D.hpp',
|
||||
'etk/math/Quaternion.hpp',
|
||||
'etk/math/Transform3D.hpp',
|
||||
'etk/os/Fifo.hpp',
|
||||
'etk/archive/Archive.hpp',
|
||||
'etk/archive/Zip.hpp',
|
||||
'etk/TreeNode.hpp',
|
||||
'etk/FlatTree.hpp',
|
||||
'etk/uri/Uri.hpp',
|
||||
'etk/uri/uri.hpp',
|
||||
'etk/uri/Query.hpp',
|
||||
'etk/uri/provider/provider.hpp',
|
||||
'etk/uri/provider/Interface.hpp',
|
||||
'etk/uri/provider/ProviderFile.hpp',
|
||||
'etk/uri/provider/ProviderFileZip.hpp',
|
||||
])
|
||||
|
||||
# build in C++ mode
|
||||
my_module.compile_version("c++", 2017)
|
||||
# add dependency of the generic C++ library:
|
||||
my_module.add_depend([
|
||||
'c',
|
||||
'm',
|
||||
'elog',
|
||||
'ememory',
|
||||
'etk-core',
|
||||
])
|
||||
# TODO: Remove this ==> when ready to remove dependency with stl:
|
||||
my_module.add_depend(['cxx'])
|
||||
|
||||
# add some optionnal libraries
|
||||
my_module.add_optionnal_depend('minizip', export=True)
|
||||
my_module.add_optionnal_depend('linearmath', ["c", "-DETK_BUILD_LINEARMATH"], export=True)
|
||||
|
||||
if "Android" in target.get_type():
|
||||
my_module.add_depend("SDK")
|
||||
|
||||
my_module.add_path(".")
|
||||
return True
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user