I am trying to use CMake for a small Java project that's part of a bigger C++ project. I have a Java project that looks like that:
project(MyProject Java)
include_directories("${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/MyProject.dir")
add_library(MyProject
file1.java
file2.java
file3.java
)
It works on Linux. However, when I tried it on Windows, I've ran into two
problems:
1) The resulting *.class files were placed in "${CMAKE_CURRENT_BINARY_DIR}". As
a
work around, I changed include_directories to be:
include_directories("${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/MyProject.dir"
"${CMAKE_CURRENT_BINARY_DIR}")
Is there a way to specify where the *.class file will be generated?
2) Unlike on Linux, the java files are not compiled in a listed order. I have
dependencies where
one file2.java depends on file1.class so it doesn't compile.
How can I tell it to compile the *.java files in specific order? Is there a way
for CMake to automatically
determine the dependencies?
Thank You
--
Artur Kedzierski
smime.p7s
Description: S/MIME cryptographic signature
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
