Skip to content

Commit

Permalink
Merge pull request #2 from jmacheta/make_cubeide_cubemx_usable
Browse files Browse the repository at this point in the history
fix builtin JRE path detection on windows
  • Loading branch information
jmacheta authored Apr 8, 2024
2 parents 4e4ac19 + c7ed80f commit c3bd1c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.21)

project(cubemx_cmake VERSION 1.0.0)
project(cubemx_cmake VERSION 1.0.1)

option(CUBEMX_CMAKE_BUILD_TESTS "Forces building test cases" OFF)

Expand Down
4 changes: 2 additions & 2 deletions find_cubemx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function (find_cubemx_standalone)
message(CHECK_START "Looking for JRE")
message(TRACE "CubeMX home directory: ${CUBEMX_HOME}")

find_file(JRE_EXE java HINTS "${CUBEMX_HOME}/jre/bin")
find_file(JRE_EXE NAMES java java.exe HINTS "${CUBEMX_HOME}/jre/bin")
if (NOT JRE_EXE)
message(CHECK_FAIL "not found")
return()
Expand All @@ -45,7 +45,7 @@ function (find_cubeide)
endif ()

# Gather instances from Windows default installation path
set(CUBEIDE_DEFAULT_DIR_WINDOWS "E:/ST")
set(CUBEIDE_DEFAULT_DIR_WINDOWS "C:/ST")
file(GLOB CUBEIDE_DIRS "${CUBEIDE_DEFAULT_DIR_WINDOWS}/STM32CubeIDE_*")
list(SORT CUBEIDE_DIRS ORDER DESCENDING)
list(APPEND CUBEIDE_PATHS "${CUBEIDE_DIRS}")
Expand Down

0 comments on commit c3bd1c8

Please sign in to comment.