[DEV] add basic catkin
This commit is contained in:
parent
9ccf8eea83
commit
cf7a98f8a4
83
catkin/CMakeLists.txt
Normal file
83
catkin/CMakeLists.txt
Normal file
@ -0,0 +1,83 @@
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(etk)
|
||||
|
||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
|
||||
## Find catkin macros and libraries
|
||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
||||
## is used, also find other catkin packages
|
||||
find_package(catkin)
|
||||
|
||||
|
||||
###################################
|
||||
## catkin specific configuration ##
|
||||
###################################
|
||||
## The catkin_package macro generates cmake config files for your package
|
||||
## Declare things to be passed to dependent projects
|
||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
||||
catkin_package(
|
||||
INCLUDE_DIRS ../ ../binding_X11
|
||||
LIBRARIES ${PROJECT_NAME}
|
||||
DEPENDS system_lib
|
||||
)
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
## Specify additional locations of header files
|
||||
## Your package locations should be listed before other locations
|
||||
include_directories(
|
||||
..
|
||||
../binding_X11
|
||||
${catkin_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
## Declare a cpp library
|
||||
add_library(${PROJECT_NAME}
|
||||
../${PROJECT_NAME}/debug.cpp
|
||||
../${PROJECT_NAME}/stdTools.cpp
|
||||
../${PROJECT_NAME}/log.cpp
|
||||
../${PROJECT_NAME}/tool.cpp
|
||||
../${PROJECT_NAME}/Noise.cpp
|
||||
../${PROJECT_NAME}/Color.cpp
|
||||
../${PROJECT_NAME}/math/Matrix4.cpp
|
||||
../${PROJECT_NAME}/math/Vector2D.cpp
|
||||
../${PROJECT_NAME}/math/Vector3D.cpp
|
||||
../${PROJECT_NAME}/math/Vector4D.cpp
|
||||
../${PROJECT_NAME}/os/FSNode.cpp
|
||||
../${PROJECT_NAME}/os/FSNodeRight.cpp
|
||||
../${PROJECT_NAME}/archive/Archive.cpp
|
||||
../${PROJECT_NAME}/archive/Zip.cpp
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-std=c++11 -DDEBUG_LEVEL=3 -DDEBUG=1 -D__CPP_VERSION__=2011 -D__TARGET_OS__Linux")
|
||||
|
||||
|
||||
## Add cmake target dependencies of the executable/library
|
||||
## as an example, message headers may need to be generated before nodes
|
||||
#add_dependencies(${PROJECT_NAME} test_perfo_core_generate_messages_cpp)
|
||||
|
||||
## Specify libraries to link a library or executable target against
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
${catkin_LIBRARIES}
|
||||
)
|
||||
|
||||
#############
|
||||
## Install ##
|
||||
#############
|
||||
|
||||
## Mark executables and/or libraries for installation
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
)
|
||||
|
||||
## Mark cpp header files for installation
|
||||
install(DIRECTORY ../${PROJECT_NAME}/
|
||||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
)
|
9
catkin/package.xml
Normal file
9
catkin/package.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<package>
|
||||
<name>etk</name>
|
||||
<version>0.9.1</version>
|
||||
<description>Ewol Tool kit</description>
|
||||
<maintainer email="yui.heero@gmail.com">Edouard DUPIN</maintainer>
|
||||
<license>Apache-2.0</license>
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
</package>
|
@ -357,6 +357,19 @@ void etk::initDefaultFolder(const char* _applName) {
|
||||
baseFolderData += "/";
|
||||
#endif
|
||||
baseFolderData = simplifyPath(baseFolderData);
|
||||
#if defined(__TARGET_OS__Linux)
|
||||
{
|
||||
struct stat statProperty;
|
||||
if (-1 == stat(baseFolderData.c_str(), &statProperty)) {
|
||||
//Normal case when the file does not exist ... ==> the it was in unknow mode ...
|
||||
TK_INFO("Path does not exit : '" << baseFolderData << "' ==> try tools data folder ...");
|
||||
baseFolderData += "/../../../share/";
|
||||
baseFolderData += binaryName;
|
||||
baseFolderData += "/";
|
||||
baseFolderData = simplifyPath(baseFolderData);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if defined(__TARGET_OS__IOs)
|
||||
baseFolderDataUser = binaryPath;
|
||||
|
Loading…
x
Reference in New Issue
Block a user