Fix IDL Compiler invocation on Windows
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
This commit is contained in:
parent
86d3972ad9
commit
1d923764e1
4 changed files with 7 additions and 44 deletions
|
@ -9,12 +9,14 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
find_package(Java 1.8 REQUIRED)
|
||||||
|
|
||||||
if(NOT IDLC_JAR)
|
if(NOT IDLC_JAR)
|
||||||
set(IDLC_JAR "${CMAKE_CURRENT_LIST_DIR}/idlc-jar-with-dependencies.jar")
|
set(IDLC_JAR "${CMAKE_CURRENT_LIST_DIR}/idlc-jar-with-dependencies.jar")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(LINE_ENDINGS "UNIX")
|
set(LINE_ENDINGS "UNIX")
|
||||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
|
if(WIN32)
|
||||||
set(EXTENSION ".bat")
|
set(EXTENSION ".bat")
|
||||||
set(LINE_ENDINGS "WIN32")
|
set(LINE_ENDINGS "WIN32")
|
||||||
endif()
|
endif()
|
||||||
|
@ -30,13 +32,6 @@ configure_file(
|
||||||
@ONLY
|
@ONLY
|
||||||
NEWLINE_STYLE ${LINE_ENDINGS})
|
NEWLINE_STYLE ${LINE_ENDINGS})
|
||||||
|
|
||||||
# FIXME: C++ IDL compiler depends idlpp. Leave it disabled for now.
|
|
||||||
#configure_file(
|
|
||||||
# "cmake/dds_idlcpp${EXTENSION}.in"
|
|
||||||
# "dds_idlcpp${EXTENSION}"
|
|
||||||
# @ONLY
|
|
||||||
# NEWLINE_STYLE ${LINE_ENDINGS})
|
|
||||||
|
|
||||||
if(NOT ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows"))
|
if(NOT ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows"))
|
||||||
execute_process(COMMAND chmod +x "${IDLC_DIR}/${IDLC}")
|
execute_process(COMMAND chmod +x "${IDLC_DIR}/${IDLC}")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -15,5 +15,5 @@ if "%CLASSPATH%"=="" (
|
||||||
set "CLASSPATH=@IDLC_JAR@;%CLASSPATH%"
|
set "CLASSPATH=@IDLC_JAR@;%CLASSPATH%"
|
||||||
)
|
)
|
||||||
|
|
||||||
java org.eclipse.cyclonedds.compilers.Idlc %*
|
"@Java_JAVA_EXECUTABLE@" org.eclipse.cyclonedds.compilers.Idlc %*
|
||||||
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
@echo off
|
|
||||||
REM Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
|
|
||||||
REM
|
|
||||||
REM This program and the accompanying materials are made available under the
|
|
||||||
REM terms of the Eclipse Public License v. 2.0 which is available at
|
|
||||||
REM http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
|
|
||||||
REM v. 1.0 which is available at
|
|
||||||
REM http://www.eclipse.org/org/documents/edl-v10.php.
|
|
||||||
REM
|
|
||||||
REM SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
|
||||||
|
|
||||||
if "%CLASSPATH%"=="" (
|
|
||||||
set "CLASSPATH=@IDLC_JAR@"
|
|
||||||
) else (
|
|
||||||
set "CLASSPATH=@IDLC_JAR@;%CLASSPATH%"
|
|
||||||
)
|
|
||||||
|
|
||||||
java org.eclipse.cyclonedds.compilers.Idlcpp %*
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
#
|
|
||||||
java -classpath "@IDLC_JAR@" org.eclipse.cyclonedds.compilers.Idlcpp "$@"
|
|
Loading…
Add table
Add a link
Reference in a new issue