Skip to content

Commit e33ad4b

Browse files
committed
added rmagine versioning
1 parent b4d82d4 commit e33ad4b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

CMakeLists.txt

+15-1
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,23 @@ include_directories(
4343
${catkin_INCLUDE_DIRS}
4444
)
4545

46-
find_package(rmagine REQUIRED)
46+
47+
48+
# only print warning for Rmagine version greater than RMAGINE_MAX_VERSION
49+
set(RMAGINE_MAX_VERSION "2.1.0")
50+
find_package(rmagine 2.0.0... REQUIRED)
51+
52+
53+
if(rmagine_VERSION GREATER RMAGINE_MAX_VERSION)
54+
message(WARNING "Found Rmagine version: ${rmagine_VERSION} > Latest tested Rmagine version: ${RMAGINE_MAX_VERSION}. Compile at your own risk.")
55+
else()
56+
message(STATUS "Rmagine Version: ${rmagine_VERSION_MAJOR}.${rmagine_VERSION_MINOR}.${rmagine_VERSION_PATCH}")
57+
endif()
58+
4759
include_directories(${rmagine_INCLUDE_DIRS})
4860

61+
62+
4963
if(rmagine_embree_FOUND)
5064
option(DISABLE_EMBREE "Disable Rmagine Embree backend Compilation" FALSE)
5165
endif()

0 commit comments

Comments
 (0)