Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Pope
ftl
Commits
7375d094
Commit
7375d094
authored
4 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Cmake for pylon
parent
c6a44351
No related branches found
No related tags found
1 merge request
!312
Support new basler cameras
Pipeline
#27155
passed
4 years ago
Stage: all
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+5
-0
5 additions, 0 deletions
CMakeLists.txt
cmake/FindPylon.cmake
+47
-0
47 additions, 0 deletions
cmake/FindPylon.cmake
components/common/cpp/include/ftl/config.h.in
+1
-0
1 addition, 0 deletions
components/common/cpp/include/ftl/config.h.in
with
53 additions
and
0 deletions
CMakeLists.txt
+
5
−
0
View file @
7375d094
...
@@ -10,6 +10,7 @@ include(GNUInstallDirs)
...
@@ -10,6 +10,7 @@ include(GNUInstallDirs)
include
(
CTest
)
include
(
CTest
)
enable_testing
()
enable_testing
()
option
(
WITH_PYLON
"Use Pylon for Basler cameras"
ON
)
option
(
WITH_OPTFLOW
"Use NVIDIA Optical Flow if available"
OFF
)
option
(
WITH_OPTFLOW
"Use NVIDIA Optical Flow if available"
OFF
)
option
(
WITH_OPENVR
"Build with OpenVR support"
OFF
)
option
(
WITH_OPENVR
"Build with OpenVR support"
OFF
)
option
(
WITH_OPUS
"Use Opus audio compression"
ON
)
option
(
WITH_OPUS
"Use Opus audio compression"
ON
)
...
@@ -48,6 +49,10 @@ find_package( URIParser REQUIRED )
...
@@ -48,6 +49,10 @@ find_package( URIParser REQUIRED )
find_package
(
MsgPack REQUIRED
)
find_package
(
MsgPack REQUIRED
)
find_package
(
Eigen3 REQUIRED
)
find_package
(
Eigen3 REQUIRED
)
if
(
WITH_PYLON
)
find_package
(
Pylon
)
endif
()
VERSION_STR_TO_INTS
(
OPENCV_MAJOR OPENCV_MINOR OPENCV_PATCH
${
OpenCV_VERSION
}
)
VERSION_STR_TO_INTS
(
OPENCV_MAJOR OPENCV_MINOR OPENCV_PATCH
${
OpenCV_VERSION
}
)
math
(
EXPR OPENCV_NUMBER
"(
${
OPENCV_MAJOR
}
* 10000) + (
${
OPENCV_MINOR
}
* 100) +
${
OPENCV_PATCH
}
"
)
math
(
EXPR OPENCV_NUMBER
"(
${
OPENCV_MAJOR
}
* 10000) + (
${
OPENCV_MINOR
}
* 100) +
${
OPENCV_PATCH
}
"
)
...
...
This diff is collapsed.
Click to expand it.
cmake/FindPylon.cmake
0 → 100644
+
47
−
0
View file @
7375d094
###############################################################################
# Find Pylon
#
set
(
PYLON_FOUND FALSE CACHE BOOL
""
FORCE
)
if
(
WIN32
)
find_path
(
PYLON_DIR NAMES include/pylon/PylonBase.h PATHS
"C:/Program Files/Pylon"
"C:/Program Files (x86)/Pylon"
)
else
()
find_path
(
PYLON_DIR NAMES include/pylon/PylonBase.h PATHS
"/opt/pylon"
"/opt/pylon6"
)
endif
()
if
(
PYLON_DIR
)
set
(
PYLON_FOUND TRUE CACHE BOOL
""
FORCE
)
set
(
HAVE_PYLON TRUE
)
# Find lib dir
# Find include
find_path
(
PYLON_LIBRARY_DIRS
NAMES libpylonbase.so
PATHS
${
PYLON_DIR
}
PATH_SUFFIXES lib
)
# Find include
find_path
(
PYLON_INCLUDE_DIRS
NAMES pylon/PylonBase.h
PATHS
${
PYLON_DIR
}
PATH_SUFFIXES include
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
Pylon DEFAULT_MSG PYLON_DIR
)
mark_as_advanced
(
PYLON_FOUND
)
mark_as_advanced
(
PYLON_INCLUDE_DIRS
)
mark_as_advanced
(
PYLON_LIBRARY_DIRS
)
list
(
APPEND PYLON_LIBRARIES pylonbase pylonutility GenApi_gcc_v3_1_Basler_pylon GCBase_gcc_v3_1_Basler_pylon
)
add_library
(
Pylon UNKNOWN IMPORTED
)
set_property
(
TARGET Pylon PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${
PYLON_INCLUDE_DIRS
}
)
set_property
(
TARGET Pylon PROPERTY INTERFACE_LINK_DIRECTORIES
${
PYLON_INCLUDE_DIRS
}
)
set_property
(
TARGET Pylon PROPERTY INTERFACE_LINK_LIBRARIES
${
PYLON_LIBRARIES
}
)
else
()
add_library
(
Pylon INTERFACE
)
endif
()
This diff is collapsed.
Click to expand it.
components/common/cpp/include/ftl/config.h.in
+
1
−
0
View file @
7375d094
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#cmakedefine HAVE_PORTAUDIO
#cmakedefine HAVE_PORTAUDIO
#cmakedefine HAVE_X11
#cmakedefine HAVE_X11
#cmakedefine HAVE_OPUS
#cmakedefine HAVE_OPUS
#cmakedefine HAVE_PYLON
#cmakedefine ENABLE_PROFILER
#cmakedefine ENABLE_PROFILER
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment