From 914feab1697105cf5b116766725ee112bc9b1b79 Mon Sep 17 00:00:00 2001 From: Geoffroy Jamgotchian Date: Thu, 20 Jul 2023 23:12:19 +0200 Subject: [PATCH] Fix Signed-off-by: Geoffroy Jamgotchian --- cpp/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3a537e335..6519c14c1 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -51,9 +51,15 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") set(MATH_NATIVE_INSTALL_EXTRA_COMMAND COMMAND install_name_tool -id @loader_path/${POWSYBL_MATH_NATIVE_LIB} ${CMAKE_CURRENT_BINARY_DIR}/${POWSYBL_MATH_NATIVE_JAR_ENTRY_DIR}/${POWSYBL_MATH_NATIVE_LIB}) endif() +if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + set(MVNW_COMMAND mvnw.cmd) +else() + set(MVNW_COMMAND ./mvnw) +endif() + ExternalProject_Add(mvn SOURCE_DIR ${PYPOWSYBL_JAVA_SRC_DIR} - PATCH_COMMAND ./mvnw --batch-mode clean package + PATCH_COMMAND ${MVNW_COMMAND} --batch-mode clean package CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""