From 6d10ceb338728d308864f891ef8a540da45dfa02 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 12 Jun 2013 14:34:57 +0200 Subject: [PATCH] Simplify the link specifications for libSG_java on win32 (untested). The variable SIMGRID_LIB_NAME_NAME is never used, and probably gets an undefined value here. Remove its definition. The variable SIMGRID_LIB_NAME is never set. Remove reference to it. Finally, use "target_link_libraries" for all platforms since I can't find any reason to avoid it on win32. Note that these changes are untested. --- buildtools/Cmake/MakeJava.cmake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/buildtools/Cmake/MakeJava.cmake b/buildtools/Cmake/MakeJava.cmake index a861c109fc..86d7dd372d 100644 --- a/buildtools/Cmake/MakeJava.cmake +++ b/buildtools/Cmake/MakeJava.cmake @@ -26,10 +26,11 @@ else() endif() message("-- [Java] SG_java includes: ${CHECK_INCLUDES}") +target_link_libraries(SG_java simgrid) + if(WIN32) - get_target_property(SIMGRID_LIB_NAME_NAME SG_java LIBRARY_OUTPUT_NAME) set_target_properties(SG_java PROPERTIES - LINK_FLAGS "-Wl,--subsystem,windows,--kill-at ${SIMGRID_LIB_NAME}" + LINK_FLAGS "-Wl,--subsystem,windows,--kill-at" PREFIX "") find_path(PEXPORTS_PATH NAMES pexports.exe PATHS NO_DEFAULT_PATHS) message(STATUS "pexports: ${PEXPORTS_PATH}") @@ -37,8 +38,6 @@ if(WIN32) add_custom_command(TARGET SG_java POST_BUILD COMMAND ${PEXPORTS_PATH}/pexports.exe ${CMAKE_BINARY_DIR}/SG_java.dll > ${CMAKE_BINARY_DIR}/SG_java.def) endif(PEXPORTS_PATH) -else() - target_link_libraries(SG_java simgrid) endif() # Rules to build simgrid.jar -- 2.20.1