MantisBT - CMake
View Issue Details
0012590CMakeModulespublic2011-11-23 19:292016-06-10 14:31
nizar sallem 
Andreas Schneider. 
normalfeaturealways
closedmoved 
allallall
CMake 2.8.6 
 
0012590: request feature for more flexible jar output location and better support of cmake global variables in UseJava.cmake
I was unable to move the created jar to some global location where I gather all the libraries in my project.
After examination by David Cole and Ben Boeckel I was told to send a feature request so here it is.
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY /path/to/outputs)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY /path/to/outputs)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY /path/to/outputs)
add_jar(some_jar ${some_jar_sources})
some_jar.jar will be in ${CMAKE_CURRENT_BINARY_DIR} while it should be in /path/to/outputs
No tags attached.
diff UseJava.cmake.diff (2,692) 2011-11-29 12:27
https://public.kitware.com/Bug/file/4127/UseJava.cmake.diff
Issue History
2011-09-30 13:01Source_changeset_attached => VTK master 4107f777
2011-09-30 13:01Utkarsh AyachitSource_changeset_attached => VTK master 91f287d5
2011-09-30 13:01Source_changeset_attached => VTK master 191b3e4a
2011-11-23 19:29nizar sallemNew Issue
2011-11-28 11:15Brad KingAssigned To => Andreas Schneider.
2011-11-28 11:15Brad KingStatusnew => assigned
2011-11-29 11:50Andreas Schneider.Note Added: 0027870
2011-11-29 12:27nizar sallemFile Added: UseJava.cmake.diff
2011-11-29 12:27nizar sallemNote Added: 0027871
2013-07-18 05:35Graham MarkallNote Added: 0033567
2016-06-10 14:28Kitware RobotNote Added: 0041936
2016-06-10 14:28Kitware RobotStatusassigned => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0027870)
Andreas Schneider.   
2011-11-29 11:50   
I don't have time to look into this at the moment, but patches are welcome :)
(0027871)
nizar sallem   
2011-11-29 12:27   
Original patch was sent by Allen D Byrne.
(0033567)
Graham Markall   
2013-07-18 05:35   
Is this really a bug? The jar output location can be set with

set(CMAKE_JAVA_TARGET_OUTPUT_DIR <dir>)

It's not obvious that you would want any of the library, runtime or archive directories to also set the jar output directory.
(0041936)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.