[
https://issues.apache.org/jira/browse/THRIFT-4178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15975759#comment-15975759
]
Arnaud Lacombe commented on THRIFT-4178:
----------------------------------------
quick and dirty fix, for the time being...
{noformat}
diff --git a/lib/java/CMakeLists.txt b/lib/java/CMakeLists.txt
index 57b97f1..ff81196 100644
--- a/lib/java/CMakeLists.txt
+++ b/lib/java/CMakeLists.txt
@@ -64,13 +64,11 @@ else(ANDROID)
DEPENDS ${ThriftJava_ARTIFACTS}
)
- # Hook the ant install task into CMake install
- install(CODE "execute_process(
- COMMAND ${Ant_EXECUTABLE} ${ANT_FLAGS} install
- -Dbuild.dir=\"${CMAKE_CURRENT_BINARY_DIR}\"
- -Dinstall.path=\"${JAVA_INSTALL_DIR}\"
-Dinstall.javadoc.path=\"${JAVA_DOC_INSTALL_DIR}\" -f build.xml
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- )")
+ # Work-around THRIFT-4178 and install things manually...
+ foreach (_artifacts ${ThriftJava_ARTIFACTS})
+ install(FILES "${CMAKE_BINARY_DIR}/lib/java/${_artifacts}" DESTINATION
"lib/java")
+ endforeach()
+ install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/java/lib/" DESTINATION
"lib/java")
if(BUILD_TESTING)
add_test(NAME JavaTest
{noformat}
> Java libraries missing from package when using cmake
> ----------------------------------------------------
>
> Key: THRIFT-4178
> URL: https://issues.apache.org/jira/browse/THRIFT-4178
> Project: Thrift
> Issue Type: Bug
> Reporter: Arnaud Lacombe
>
> The CMake infrastructure fails to include the java libraries in the generated
> package. Instead, the libraries are wrongly installed on the build host. The
> problem is likely due to the following line:
> lib/java/CMakeLists.txt:
> {noformat}
> [...]
> # Hook the ant install task into CMake install
>
>
> install(CODE "execute_process(
> COMMAND ${Ant_EXECUTABLE} ${ANT_FLAGS} install
>
>
> -Dbuild.dir=\"${CMAKE_CURRENT_BINARY_DIR}\"
> -Dinstall.path=\"${JAVA_INSTALL_DIR}\"
> -Dinstall.javadoc.path=\"${JAVA_DOC_INSTALL_DIR}\" -f build.xml
> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
>
>
> )")
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)