简体   繁体   中英

CMake can't find Java because of Cygwin

A user of my software is running Windows with Cygwin installed, which provides access to the standard GNU which command. In my CMakeLists.txt there is a line that reads:

FIND_PACKAGE( JAVA REQUIRED CONFIG )

This fails on his machine, because both JAVAConfig.cmake and java-config.cmake (executed by FIND_PACKAGE) use this command as a first-line attack in locating Java. The command returns a bad path to a non-existent install of Java. What can I do to override this annoying behavior from my CMakeLists.txt?

Ask him to send you his "path" env. variable, you will find something interesting there for sure.

Other issue is Java installations. Ask him to unstall old javas or just update to newest, current installer removes older copies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM