Commit 5d684746 authored by Sören Schwertfeger's avatar Sören Schwertfeger
Browse files

compiles on Ubuntu 14.04

parent 15b283bb
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 2.8)
option( INSTALL_QTRANSFORMS_PLUGIN "Check to install qTransforms plugin" ON ) option( INSTALL_QTRANSFORMS_PLUGIN "Check to install qTransforms plugin" ON )
# CloudCompare 'Transforms' plugin # CloudCompare 'Transforms' plugin
if (INSTALL_QTRANSFORMS_PLUGIN) if (INSTALL_QTRANSFORMS_PLUGIN)
add_subdirectory (sttl)
project( QTRANSFORMS_PLUGIN ) project( QTRANSFORMS_PLUGIN )
add_subdirectory (sttl)
include( ../CMakePluginTpl.cmake ) include( ../CMakePluginTpl.cmake )
......
...@@ -43,8 +43,11 @@ class qTransformsPlugin : public QObject, public ccStdPluginInterface ...@@ -43,8 +43,11 @@ class qTransformsPlugin : public QObject, public ccStdPluginInterface
Q_OBJECT Q_OBJECT
Q_INTERFACES(ccStdPluginInterface) Q_INTERFACES(ccStdPluginInterface)
//replace qDummy by the plugin name (IID should be unique - let's hope your plugin name is unique ;) //replace qDummy by the plugin name (IID should be unique - let's hope your plugin name is unique ;)
Q_PLUGIN_METADATA(IID "cccorp.cloudcompare.plugin.qTransforms") #ifdef CC_QT5
Q_PLUGIN_METADATA(IID "cccorp.cloudcompare.plugin.qTransforms")
//replace qDummy by the plugin name (IID should be unique - let's hope your plugin name is unique ;)
#endif
public: public:
//! Default constructor //! Default constructor
......
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 2.8)
# CloudCompare 'Transforms' plugin # CloudCompare 'Transforms' plugin
project( STTL ) project( STTL )
set( CMAKE_AUTOMOC OFF ) set( CMAKE_AUTOMOC OFF )
if (APPLE)
find_package( JsonCpp REQUIRED ) find_package( JsonCpp REQUIRED )
SET( EIGEN3_INCLUDE_DIR "$ENV{EIGEN3_INCLUDE_DIR}" ) SET( EIGEN3_INCLUDE_DIR "$ENV{EIGEN3_INCLUDE_DIR}" )
IF( NOT EIGEN3_INCLUDE_DIR ) IF( NOT EIGEN3_INCLUDE_DIR )
...@@ -15,6 +16,28 @@ cmake_minimum_required(VERSION 3.0) ...@@ -15,6 +16,28 @@ cmake_minimum_required(VERSION 3.0)
INCLUDE_DIRECTORIES ( ${EIGEN3_INCLUDE_DIR} ) INCLUDE_DIRECTORIES ( ${EIGEN3_INCLUDE_DIR} )
MESSAGE("EIGEN3_INCLUDE_DIR: ${EIGEN3_INCLUDE_DIR} ") MESSAGE("EIGEN3_INCLUDE_DIR: ${EIGEN3_INCLUDE_DIR} ")
else()
find_package(Eigen3 REQUIRED)
# pkg-config jsoncpp --libs --libs
include_directories(${EIGEN3_INCLUDE_DIR})
SET(JsonCpp_includes "/usr/include/jsoncpp")
MESSAGE("JsonCpp_includes: ${JsonCpp_includes} ")
MESSAGE("EIGEN3_INCLUDE_DIR: ${EIGEN3_INCLUDE_DIR} ")
SET(jsoncpp_lib_static "jsoncpp" )
# /lib/x86_64-linux-gnu/libjsoncpp.a
SET(CMAKE_CXX_FLAGS "-std=c++11 " )
endif()
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
...@@ -26,13 +49,17 @@ cmake_minimum_required(VERSION 3.0) ...@@ -26,13 +49,17 @@ cmake_minimum_required(VERSION 3.0)
#target_link_libraries( ${PROJECT_NAME} CC_CORE_LIB ) #target_link_libraries( ${PROJECT_NAME} CC_CORE_LIB )
get_target_property(JsonCpp_includes jsoncpp_lib_static INTERFACE_INCLUDE_DIRECTORIES) if (APPLE)
get_target_property(JsonCpp_includes ${jsoncpp_lib_static} INTERFACE_INCLUDE_DIRECTORIES)
endif()
INCLUDE_DIRECTORIES ( ${JsonCpp_includes} ) INCLUDE_DIRECTORIES ( ${JsonCpp_includes} )
set_target_properties(${PROJECT_NAME} PROPERTIES set_target_properties(${PROJECT_NAME} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${EIGEN3_INCLUDE_DIR};${CMAKE_CURRENT_SOURCE_DIR}" INTERFACE_INCLUDE_DIRECTORIES "${EIGEN3_INCLUDE_DIR};${CMAKE_CURRENT_SOURCE_DIR}"
) )
#set dependencies to necessary libraries (see qPCV for an example) #set dependencies to necessary libraries (see qPCV for an example)
target_link_libraries( ${PROJECT_NAME} jsoncpp_lib_static ) target_link_libraries( ${PROJECT_NAME} ${jsoncpp_lib_static} )
#include_directories( ${LIB1_INCLUDE_DIR} ) #include_directories( ${LIB1_INCLUDE_DIR} )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment