View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0006960 | CMake | CMake | public | 2008-05-05 17:39 | 2016-06-10 14:30 | ||||
Reporter | Mike Mattie | ||||||||
Assigned To | Bill Hoffman | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-6 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0006960: Cmake 2.4.8 No way to specify Main-Class in manifest when creating jar files (ADD_EXECUTABLE with java support?) | ||||||||
Description | While using CMake (2.4.8) on darwin (10.4 ppc) There is no way I could discover in the man page to specify the entry point for a jar file. ADD_EXECUTABLE: does not work with java, ADD_LIBRARY: creates a jar file, no way to specify the value of Main-Class or a manifest file to be supplied to the jar command. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0021510) Denis Scherbakov (reporter) 2010-07-28 10:00 |
I am using 2.6.4 and the problem is still there. (not sure about 2.8) What we need is just to be able to specify an entry point. - CMAKE_Java_CREATE_STATIC_LIBRARY: <CMAKE_Java_ARCHIVE> -cf <TARGET> -C <OBJECT_DIR> ${class_files_mask} + CMAKE_Java_CREATE_STATIC_LIBRARY: <CMAKE_Java_ARCHIVE> -cfe <TARGET> org.my.special.java.class.MyEntryPoint -C <OBJECT_DIR> ${class_files_mask} Example: /usr/bin/jar -cfe myprog.jar org.my.special.java.class.MyEntryPoint -C CMakeFiles/myprog.dir . |
(0021512) Denis Scherbakov (reporter) 2010-07-28 11:04 |
Or alternatively, we could use ADD_LIBRARY and then ADD_CUSTOM_COMMAND to update JAR: MACRO(MACRO_MAKE_JAR_EXECUTABLE VAR_TARGET VAR_ENTRY) GET_TARGET_PROPERTY(VAR_LOCATION "${VAR_TARGET}" LOCATION) ADD_CUSTOM_COMMAND(TARGET ${VAR_TARGET} POST_BUILD COMMAND ${CMAKE_Java_ARCHIVE} ufe ${VAR_LOCATION} ${VAR_ENTRY} COMMENT "Creating JAR entry point.") UNSET(VAR_LOCATION) ENDMACRO() SET (MY_ENTRY "path.to.my.Main") ADD_LIBRARY(MyJavaLibrary ${MY_SRCS}) MACRO_MAKE_JAR_EXECUTABLE(MyJavaLibrary "${MY_ENTRY}") |
(0041424) Kitware Robot (administrator) 2016-06-10 14:27 |
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. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2008-05-05 17:39 | Mike Mattie | New Issue | |
2008-09-25 17:03 | Bill Hoffman | Status | new => assigned |
2008-09-25 17:03 | Bill Hoffman | Assigned To | => Bill Hoffman |
2010-07-28 10:00 | Denis Scherbakov | Note Added: 0021510 | |
2010-07-28 11:04 | Denis Scherbakov | Note Added: 0021512 | |
2016-06-10 14:27 | Kitware Robot | Note Added: 0041424 | |
2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved |
2016-06-10 14:27 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:30 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |