Allow BUILD_IDLC to be 'AUTO' based on Maven presence

Signed-off-by: Scott K Logan <logans@cottsay.net>
This commit is contained in:
Scott K Logan 2019-11-13 16:19:40 -08:00 committed by eboasson
parent 9260464be8
commit 7b428f14b9

View file

@ -48,8 +48,11 @@ string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_SMALL)
# By default the Java-based components get built, but make it possible to disable that: if only the
# core library is required, there's no need to build them, and that in turn eliminates the Maven and
# JDK dependency.
option(BUILD_IDLC "Build IDL preprocessor" ON)
if(BUILD_IDLC STREQUAL "AUTO")
find_package(Maven 3.0 QUIET)
option(BUILD_IDLC "Build IDL preprocessor" ${Maven_FOUND})
set(BUILD_IDLC ${Maven_FOUND})
endif()
set(CMAKE_C_STANDARD 99)
if(CMAKE_SYSTEM_NAME STREQUAL "VxWorks")