Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
fmt_converter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xuebingbing
fmt_converter
Commits
5aac87e3
Commit
5aac87e3
authored
Dec 21, 2020
by
xuebingbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 增加cmake安装相关控制
parent
4ed9d944
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
91 additions
and
40 deletions
+91
-40
CMakeLists.txt
src/CMakeLists.txt
+3
-3
CMakeLists.txt
src/convert/CMakeLists.txt
+0
-27
CMakeLists.txt
src/jfhdconvert/CMakeLists.txt
+62
-0
convertor.cpp
src/jfhdconvert/convertor.cpp
+3
-0
convertor.h
src/jfhdconvert/convertor.h
+0
-0
export.h
src/jfhdconvert/export.h
+0
-0
xxx-config.cmake.in
src/jfhdconvert/xxx-config.cmake.in
+4
-0
CMakeLists.txt
src/jfhdconvertor/CMakeLists.txt
+11
-2
main.cpp
src/jfhdconvertor/main.cpp
+8
-8
No files found.
src/CMakeLists.txt
View file @
5aac87e3
add_subdirectory
(
convertor
)
add_subdirectory
(
convert
)
\ No newline at end of file
add_subdirectory
(
jfhdconvertor
)
add_subdirectory
(
jfhdconvert
)
\ No newline at end of file
src/convert/CMakeLists.txt
deleted
100644 → 0
View file @
4ed9d944
string
(
TIMESTAMP TIME %Y%m%d%H
)
project
(
jfhdconvert VERSION 0.0.1.
${
TIME
}
)
add_definitions
(
-DCONVERT_EXPORT
)
find_package
(
PDAL REQUIRED
)
find_package
(
PCL REQUIRED COMPONENTS common io
)
file
(
GLOB_RECURSE INC_FILES *.h *.hpp
)
file
(
GLOB_RECURSE SRC_FILES *.cpp
)
add_library
(
${
PROJECT_NAME
}
SHARED
${
INC_FILES
}
${
SRC_FILES
}
)
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC $<BUILD_INTERFACE:
${
PCL_INCLUDE_DIRS
}
>
PRIVATE $<INSTALL_INTERFACE:
${
PCL_INCLUDE_DIRS
}
>
)
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE
${
PCL_LIBRARIES
}
PRIVATE pdalcpp pdal_util pdal_arbiter pdal_kazhdan
)
#安装相关的命令
src/jfhdconvert/CMakeLists.txt
0 → 100644
View file @
5aac87e3
string
(
TIMESTAMP TIME %Y%m%d%H
)
project
(
jfhdconvert VERSION 0.0.1.
${
TIME
}
)
string
(
TOLOWER
"
${
PROJECT_NAME
}
"
PROJECT_LOWNAME
)
add_definitions
(
-DCONVERT_EXPORT
)
find_package
(
PDAL REQUIRED
)
find_package
(
PCL REQUIRED COMPONENTS common io
)
file
(
GLOB_RECURSE INC_FILES *.h *.hpp
)
file
(
GLOB_RECURSE SRC_FILES *.cpp
)
set
(
EXPORT_INC_FILES convertor.h export.h
)
add_library
(
${
PROJECT_NAME
}
SHARED
${
INC_FILES
}
${
SRC_FILES
}
)
set_target_properties
(
${
PROJECT_NAME
}
PROPERTIES
PUBLIC_HEADER
"
${
EXPORT_INC_FILES
}
"
)
set_property
(
TARGET
${
PROJECT_NAME
}
PROPERTY DEBUG_POSTFIX d
)
target_include_directories
(
${
PROJECT_NAME
}
PRIVATE
${
PCL_INCLUDE_DIRS
}
)
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE
${
PCL_LIBRARIES
}
PRIVATE pdalcpp pdal_util pdal_arbiter pdal_kazhdan
)
########安装相关的命令
include
(
GNUInstallDirs
)
include
(
CMakePackageConfigHelpers
)
set
(
PROJECT_CONFIG
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
PROJECT_LOWNAME
}
-config.cmake
)
set
(
VERSION_CONFIG
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
PROJECT_LOWNAME
}
-config-version.cmake
)
set
(
TARGETS_EXPORT_NAME
${
PROJECT_LOWNAME
}
-targets
)
# 生成 version,config target 文件到 build tree
write_basic_package_version_file
(
${
VERSION_CONFIG
}
VERSION
${
PROJECT_VERSION
}
COMPATIBILITY AnyNewerVersion
)
configure_package_config_file
(
xxx-config.cmake.in
${
PROJECT_CONFIG
}
INSTALL_DESTINATION
${
CMAKE_INSTALL_DATAROOTDIR
}
/
${
PROJECT_LOWNAME
}
)
# install version, config and target files
install
(
TARGETS
${
PROJECT_NAME
}
EXPORT
${
TARGETS_EXPORT_NAME
}
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
PUBLIC_HEADER DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/
${
PROJECT_LOWNAME
}
INCLUDES DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/
${
PROJECT_LOWNAME
}
)
install
(
FILES
${
PROJECT_CONFIG
}
${
VERSION_CONFIG
}
DESTINATION
${
CMAKE_INSTALL_DATAROOTDIR
}
/
${
PROJECT_LOWNAME
}
)
install
(
EXPORT
${
TARGETS_EXPORT_NAME
}
DESTINATION
${
CMAKE_INSTALL_DATAROOTDIR
}
/
${
PROJECT_LOWNAME
}
)
src/convert/convertor.cpp
→
src/
jfhd
convert/convertor.cpp
View file @
5aac87e3
#
include
"convertor.h"
#ifdef WIN32
#include <corecrt_io.h>
#endif // WIN32
// pcl
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
...
...
src/convert/convertor.h
→
src/
jfhd
convert/convertor.h
View file @
5aac87e3
File moved
src/convert/export.h
→
src/
jfhd
convert/export.h
View file @
5aac87e3
File moved
src/jfhdconvert/xxx-config.cmake.in
0 → 100644
View file @
5aac87e3
@PACKAGE_INIT@
include(${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake)
check_required_components(jfhdconvert)
src/convertor/CMakeLists.txt
→
src/
jfhd
convertor/CMakeLists.txt
View file @
5aac87e3
...
...
@@ -2,6 +2,8 @@
string
(
TIMESTAMP TIME %Y%m%d%H
)
project
(
jfhdconvertor VERSION 0.0.1.
${
TIME
}
)
string
(
TOLOWER
"
${
PROJECT_NAME
}
"
LOW_PROJECT_NAME
)
find_package
(
cxxopts REQUIRED
)
...
...
@@ -11,7 +13,10 @@ find_package(PCL REQUIRED COMPONENTS common io)
file
(
GLOB_RECURSE INC_FILES *.h *.hpp
)
file
(
GLOB_RECURSE SRC_FILES *.cpp
)
add_executable
(
${
PROJECT_NAME
}
${
INC_FILES
}
${
SRC_FILES
}
)
set
(
EXPORT_INC_FILES export.h convertor.h
)
add_executable
(
${
PROJECT_NAME
}
${
INC_FILES
}
${
SRC_FILES
}
)
set_property
(
TARGET
${
PROJECT_NAME
}
PROPERTY DEBUG_POSTFIX d
)
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE jfhdconvert
...
...
@@ -20,4 +25,8 @@ target_link_libraries(${PROJECT_NAME}
)
# install cmd
install
(
TARGETS
${
PROJECT_NAME
}
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include/
${
PROJECT_NAME
}
)
src/convertor/main.cpp
→
src/
jfhd
convertor/main.cpp
View file @
5aac87e3
...
...
@@ -2,14 +2,14 @@
#include <fstream>
#include <algorithm>
#include <pdal/PointTable.hpp>
#include <pdal/PointView.hpp>
#include <pdal/Options.hpp>
#include <pdal/io/BufferReader.hpp>
#include <pdal/StageFactory.hpp>
#include <pdal/Dimension.hpp>
#include "../convert/convertor.h"
//
#include <pdal/PointTable.hpp>
//
#include <pdal/PointView.hpp>
//
#include <pdal/Options.hpp>
//
#include <pdal/io/BufferReader.hpp>
//
#include <pdal/StageFactory.hpp>
//
#include <pdal/Dimension.hpp>
//
#include "../
jfhd
convert/convertor.h"
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment