Disabling idlc means no IdlcGenerate

Setting BUILD_IDLC=OFF makes it possible to build Cyclone without
its (Java-based) IDL preprocessor.  In that case there is no
IdlcGenerate.cmake, and therefore the generated CycloneDDSConfig.cmake
must not try to include it either.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-08-26 14:07:46 +02:00
parent e42092af92
commit 13eb5f1d87
3 changed files with 25 additions and 5 deletions

View file

@ -21,10 +21,17 @@ set(PACKAGING_MODULE_DIR "${PROJECT_SOURCE_DIR}/cmake/Modules/Packaging")
set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}")
# Generates <Package>Config.cmake.
configure_package_config_file(
if(BUILD_IDLC)
configure_package_config_file(
"${PACKAGING_MODULE_DIR}/PackageConfig.cmake.in"
"${CMAKE_PROJECT_NAME}Config.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_CMAKEDIR}")
else()
configure_package_config_file(
"${PACKAGING_MODULE_DIR}/PackageConfigNoIdlc.cmake.in"
"${CMAKE_PROJECT_NAME}Config.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_CMAKEDIR}")
endif()
# Generates <Package>Version.cmake.
write_basic_package_version_file(

View file

@ -13,4 +13,3 @@
include("${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@Targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/idlc/IdlcGenerate.cmake")

View file

@ -0,0 +1,14 @@
#
# Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
# v. 1.0 which is available at
# http://www.eclipse.org/org/documents/edl-v10.php.
#
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
#
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@Targets.cmake")