From e89bc55b9fef742c7eacfc199e31e79344d23b51 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Fri, 16 Nov 2018 14:02:56 +0000 Subject: [PATCH] cmake --- CMakeLists.txt | 45 ++++++++-------- CXX/CMakeLists.txt | 26 +++++----- JIT/CMakeLists.txt | 51 +++++++++---------- OPTYap/CMakeLists.txt | 2 +- Packages.cmake | 4 +- cmake/Prelims.cmake | 8 ++- dlocals.h | 3 ++ libYap.cmake | 6 +-- library/CMakeLists.txt | 4 +- library/clp/CMakeList.txt | 2 +- library/clp/CMakeLists.txt | 2 +- library/dialect/CMakeLists.txt | 2 +- library/dialect/swi/CMakeLists.txt | 2 +- library/dialect/swi/fli/CMakeLists.txt | 2 +- library/dialect/swi/os/CMakeLists.txt | 2 +- library/dialect/swi/os/libtai/CMakeLists.txt | 2 +- library/lammpi/CMakeLists.txt | 6 +-- library/matlab/CMakeLists.txt | 4 +- library/matrix/CMakeLists.txt | 6 +-- library/random/CMakeLists.txt | 4 +- library/regex/CMakeLists.txt | 6 +-- library/rltree/CMakeLists.txt | 4 +- library/system/CMakeLists.txt | 6 +-- library/system/sys_config.h | 2 +- library/tries/CMakeLists.txt | 12 ++--- library/ytest/CMakeLists.txt | 2 +- os/CMakeLists.txt | 6 +-- packages/CLPBN/CMakeLists.txt | 6 +-- packages/CLPBN/horus/CMakeLists.txt | 4 +- packages/CMakeLists.txt | 10 ++-- packages/ProbLog/CMakeLists.txt | 4 +- packages/bdd/CMakeLists.txt | 17 +++---- packages/bdd/cmake/FindYAP.cmake | 4 +- packages/bdd/simplecudd/CMakeLists.txt | 2 +- packages/bdd/simplecudd_lfi/CMakeLists.txt | 2 +- packages/clpqr/CMakeLists.txt | 2 +- packages/cplint/CMakeLists.txt | 22 ++++---- .../approx/simplecuddLPADs/CMakeLists.txt | 2 +- packages/cuda/CMakeLists.txt | 6 +-- packages/gecode/CMakeLists.txt | 10 ++-- packages/jpl/CMakeLists.txt | 2 +- packages/jpl/jpl.pl | 4 +- packages/jpl/src/c/CMakeLists.txt | 23 ++------- packages/jpl/src/java/CMakeLists.txt | 2 +- packages/myddas/mysql/CMakeLists.txt | 6 +-- packages/myddas/odbc/CMakeLists.txt | 6 +-- packages/myddas/pl/CMakeLists.txt | 4 +- packages/myddas/postgres/CMakeLists.txt | 6 +-- packages/myddas/sqlite3/CMakeLists.txt | 10 ++-- packages/python/CMakeLists.txt | 14 ++--- packages/python/swig/CMakeLists.txt | 4 +- packages/python/swig/setup.py | 21 ++++---- packages/python/yap_kernel/CMakeLists.txt | 2 +- packages/raptor/CMakeLists.txt | 18 +++---- packages/raptor/cmake/FindYAP.cmake | 4 +- packages/real/CMakeLists.txt | 8 +-- packages/swi-minisat2/C/CMakeLists.txt | 4 +- packages/swi-minisat2/CMakeLists.txt | 2 +- packages/swig/android/CMakeLists.txt | 14 ++--- packages/swig/java/CMakeLists.txt | 10 ++-- packages/swig/js/CMakeLists.txt | 14 ++--- packages/xml/CMakeLists.txt | 4 +- packages/yap-lbfgs/CMakeLists.txt | 8 +-- pl/CMakeLists.txt | 6 +-- swi/library/CMakeLists.txt | 4 +- 65 files changed, 247 insertions(+), 265 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index edbe50119..9e4eba6f6 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.4) # Sets the version of CMake required to build the native # library. You should either keep the default value or pass a -# value of 3.4.0 or lower. +# value of 3.4.0 or lower.fg include(CMakeToolsHelpers OPTIONAL) include(FeatureSummary) @@ -313,22 +313,8 @@ ADD_CUSTOM_TARGET(run_install COMMAND ${CMAKE_MAKE_PROGRAM} install) set(prefix ${CMAKE_INSTALL_PREFIX}) #BINDIR}) -set(bindir ${CMAKE_INSTALL_PREFIX}/bin) #BINDIR}) -set(includedir ${CMAKE_INSTALL_PREFIX}/include) #INCLUDEDIR}) -set(libdir ${CMAKE_INSTALL_PREFIX}/lib) #LIBDIR}) -set(exec_prefix ${CMAKE_INSTALL_PREFIX}/libexec) #LIBEXECDIR}) -set(datarootdir ${CMAKE_INSTALL_PREFIX}/share) #DATAROOTDIR}) -if (ANDROID) - set(datarootdir ${YAP_APP_DIR}/src/generated/assets) -endif () -set(datadir ${CMAKE_INSTALL_PREFIX}/share) #DATADIR}) -set(mandir ${CMAKE_INSTALL_PREFIX}/share/man) #MANDIR}) set(docdir ${CMAKE_INSTALL_PREFIX}/share/docs) #MANDIR}) -set(libpl ${datadir}/Yap) - -set(dlls ${libdir}/Yap) - set(YAP_ROOTDIR ${prefix}) # erootdir -> rootdir # libdir defined above @@ -338,10 +324,8 @@ set(YAP_LIBDIR ${CMAKE_INSTALL_FULL_LIBDIR}) set(YAP_DLLDIR ${CMAKE_INSTALL_FULL_LIBDIR}/Yap) set(YAP_PLDIR ${CMAKE_INSTALL_FULL_DATADIR}/Yap) -set(YAP_INSTALL_DLLDIR ${CMAKE_INSTALL_LIBDIR}/Yap) -set(YAP_INSTALL_PLDIR ${CMAKE_INSTALL_DATADIR}/Yap) - -set(libpl ${YAP_INSTALL_PLDIR}) +set(YAP_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}/Yap) +set(YAP_INSTALL_DATADIR ${CMAKE_INSTALL_DATADIR}/Yap) # # @@ -499,9 +483,9 @@ endif () # # ## the RPATH to be used when installing, but only if it's not a system directory -#LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${libdir}" isSystemDir) +#LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${YAP_INSTALL_LIBDIR}" isSystemDir) # IF("${isSystemDir}" STREQUAL "-1") -# SET(CMAKE_INSTALL_RPATH ${libdir}) +# SET(CMAKE_INSTALL_RPATH ${YAP_INSTALL_LIBDIR}) #ENDIF("${isSystemDir}" STREQUAL "-1") # IF(NOT WIN32 AND NOT APPLE) @@ -866,6 +850,19 @@ if (WITH_JAVA) # JAVA_AWT_INCLUDE_PATH = the include path to jawt.h + + get_filename_component ( JAVA_AWT_DIR ${JAVA_AWT_LIBRARY} DIRECTORY) + get_filename_component ( JAVA_JNI_DIR ${JAVA_JVM_LIBRARY} DIRECTORY) + list(APPEND CMAKE_INSTALL_RPATH ${JAVA_AWT_DIR};${JAVA_JNI_DIR}) +if (APPLE) + set(CMAKE_MACOSX_RPATH 1) + find_library (JLI jli ${JAVA_AWT_DIR}/jli) + find_library (JAL JavaApplicationLauncher FRAMEWORK ONLY PATH /System/Library/PrivateFrameworks) + find_library (JL JavaLaunching FRAMEWORK ONLY PATH /System/Library/PrivateFrameworks) + list(APPEND CMAKE_INSTALL_RPATH ${JAVA_AWT_DIR}/jli) +list(APPEND JNI_LIBRARIES ${JLI};${JAL};${JL}) +endif() + endif (JNI_FOUND) @@ -958,8 +955,8 @@ target_link_libraries(yap-bin libYap) install(TARGETS libYap yap-bin RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) @@ -990,7 +987,7 @@ endif(WITH_MPI) # -install(FILES ${INCLUDE_HEADERS} ${CONFIGURATION_HEADERS} DESTINATION ${includedir}/Yap ) +install(FILES ${INCLUDE_HEADERS} ${CONFIGURATION_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Yap ) diff --git a/CXX/CMakeLists.txt b/CXX/CMakeLists.txt index c1ef100b3..ee974f924 100644 --- a/CXX/CMakeLists.txt +++ b/CXX/CMakeLists.txt @@ -5,27 +5,27 @@ set(SO_MINOR 0) set(SO_PATCH 0) set (CXX_SOURCES - yapi.cpp -) + yapi.cpp + ) list(APPEND LIBYAP_SOURCES ${CXX_SOURCES} PARENT_SCOPE) if ( WIN32 OR ANDROID) - add_component (YAP++ ${CXX_SOURCES} ) + add_component (YAP++ ${CXX_SOURCES} ) set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "_YAP_NOT_INSTALLED_=1;HAVE_CONFIG_H=1;_GNU_SOURCE;YAP_KERNEL=1" ) else() - add_lib(YAP++ ${CXX_SOURCES} ) - if (WITH_PYTHON) - target_link_libraries(YAP++ Py4YAP ) - endif() - target_link_libraries(YAP++ ${CMAKE_DL_LIBS} libYap) + add_lib(YAP++ ${CXX_SOURCES} ) + if (WITH_PYTHON) + target_link_libraries(YAP++ Py4YAP ) + endif() + target_link_libraries(YAP++ ${CMAKE_DL_LIBS} libYap) - MY_install(TARGETS YAP++ - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) + MY_install(TARGETS YAP++ + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) endif() diff --git a/JIT/CMakeLists.txt b/JIT/CMakeLists.txt index 183c6cffa..2ca4f9b50 100644 --- a/JIT/CMakeLists.txt +++ b/JIT/CMakeLists.txt @@ -2,29 +2,29 @@ set(LIBJIT_MAJOR_VERSION 0) set(LIBJIT_MINOR_VERSION 1) set(LIBJIT_PATCH_VERSION 0) set(LIBJIT_FULL_VERSION - ${LIBJIT_MAJOR_VERSION}.${LIBJIT_MINOR_VERSION}.${LIBJIT_PATCH_VERSION}) +${LIBJIT_MAJOR_VERSION}.${LIBJIT_MINOR_VERSION}.${LIBJIT_PATCH_VERSION}) - set(LIBJIT_SOURCES - jit_analysispreds.c - jit_configpreds.c - jit_statisticpreds.c - jit_codegenpreds.c - jit_debugpreds.c - jit_traced.c - jit_transformpreds.c - JIT_Compiler.cpp - JIT_Init.cpp - ) +set(LIBJIT_SOURCES + jit_analysispreds.c + jit_configpreds.c + jit_statisticpreds.c + jit_codegenpreds.c + jit_debugpreds.c + jit_traced.c + jit_transformpreds.c + JIT_Compiler.cpp + JIT_Init.cpp +) - set(LIBJIT_HEADERS - HPP/JIT.hpp - HPP/JIT_Compiler.hpp - HPP/jit_predicates.hpp - ../OPTYap/traced_or.insts.h - ../OPTYap/traced_tab.insts.h - ../OPTYap/traced_tab.tries.insts.h - ../C/traced_absmi_insts.h - ) +set(LIBJIT_HEADERS + HPP/JIT.hpp + HPP/JIT_Compiler.hpp + HPP/jit_predicates.hpp + ../OPTYap/traced_or.insts.h + ../OPTYap/traced_tab.insts.h + ../OPTYap/traced_tab.tries.insts.h + ../C/traced_absmi_insts.h +) # The following variables are defined: # LLVM_FOUND - true if LLVM was found @@ -59,18 +59,17 @@ set (POSITION_INDEPENDENT_CODE TRUE) set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${LLVM_CXXFLAGS}) add_lib (libyapjit - ${LIBJIT_SOURCES} - ${LIBJIT_HEADERS} + ${LIBJIT_SOURCES} + ${LIBJIT_HEADERS} ) set_target_properties(libyapjit PROPERTIES - # RPATH ${libdir} VERSION ${LIBJIT_FULL_VERSION} SOVERSION ${LIBJIT_MAJOR_VERSION}.${LIBJIT_MINOR_VERSION} POSITION_INDEPENDENT_CODE TRUE OUTPUT_NAME YapJIT - ) +) -target_link_libraries(libyapjit libYap ${LLVM_LIBRARIES} z) +target_link_libraries(libyapjit libYap ${LLVM_LIBRARIES}) set ( YAP_YAPJITLIB $ ) diff --git a/OPTYap/CMakeLists.txt b/OPTYap/CMakeLists.txt index 175580a3c..d85e7febf 100644 --- a/OPTYap/CMakeLists.txt +++ b/OPTYap/CMakeLists.txt @@ -71,7 +71,7 @@ add_component (libOPTYap My_set_target_properties(libOPTYap PROPERTIES - # RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION} + # RPATH ${CMAKE_INSTALL_LIBDIR} VERSION ${LIBYAPTAI_FULL_VERSION} # SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION} POSITION_INDEPENDENT_CODE TRUE OUTPUT_NAME OPTYap diff --git a/Packages.cmake b/Packages.cmake index 76096a280..a9166731a 100644 --- a/Packages.cmake +++ b/Packages.cmake @@ -159,8 +159,8 @@ target_link_libraries(yap-bin libYap ) install(TARGETS libYap yap-bin RUNTIME DESTINATION ${bindir} - LIBRARY DESTINATION ${libdir} - ARCHIVE DESTINATION ${libdir} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) diff --git a/cmake/Prelims.cmake b/cmake/Prelims.cmake index a7c4e5290..73d73a709 100644 --- a/cmake/Prelims.cmake +++ b/cmake/Prelims.cmake @@ -137,10 +137,8 @@ endif() set ( libpl ${datarootdir}/Yap) set ( includedir "${prefix}/include") set ( exec_prefix "${prefix}") -set ( libdir "${exec_prefix}/lib") set ( datadir "${datarootdir}") set ( mandir "${datarootdir}/man") -set ( bindir "${exec_prefix}/bin") set ( docdir "${datarootdir}/doc/Yap") set ( dlls "${exec_prefix}/lib/Yap") @@ -149,10 +147,10 @@ set(YAP_ROOTDIR ${prefix}) # erootdir -> rootdir # bindir defined above # libdir defined above -set(YAP_LIBDIR "${dlls}") +set(YAP_LIBDIR "${YAP_INSTALL_LIBDIR}") set(YAP_SHAREDIR "${datarootdir}") -set(YAP_BINDIR "${bindir}") -set(YAP_INCLUDEDIR "${includedir}") +set(YAP_BINDIR "${CMAKE_INSTALL_BINDIR}") +set(YAP_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}") set(YAP_ROOTDIR "${prefix}") # diff --git a/dlocals.h b/dlocals.h index a99e521c1..dcf0aed51 100644 --- a/dlocals.h +++ b/dlocals.h @@ -264,6 +264,9 @@ #define REMOTE_OpenArray(wid) (REMOTE(wid)->OpenArray) /* in a single gc */ +#define LOCAL_MallocDepth (Yap_local.MallocDepth) +#define REMOTE_MallocDepth(wid) (REMOTE(wid)->MallocDepth) + #define LOCAL_total_marked (Yap_local.total_marked) #define REMOTE_total_marked(wid) (REMOTE(wid)->total_marked) diff --git a/libYap.cmake b/libYap.cmake index 5f48bfdde..ede95a379 100644 --- a/libYap.cmake +++ b/libYap.cmake @@ -28,7 +28,7 @@ SET(CMAKE_SKIP_BUILD_RPATH FALSE) # (but later on when installing) SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) -SET(CMAKE_INSTALL_RPATH "${libdir};${dlls}:") +SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR};${YAP_INSTALL_LIBDIR}:") # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH @@ -47,9 +47,9 @@ set_target_properties(libYap endif() # the RPATH to be used when installing, but only if it's not a system directory -LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${libdir};${dlls}" isSystemDir) +LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_LIBDIR};${YAP_INSTALL_LIBDIR}" isSystemDir) IF("${isSystemDir}" STREQUAL "-1") - SET(CMAKE_INSTALL_RPATH "${libdir};${dlls}") + SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR};${YAP_INSTALL_LIBDIR}") ENDIF("${isSystemDir}" STREQUAL "-1") diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index cdbf3f35c..ccb01c7eb 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -76,10 +76,10 @@ MY_add_subdirectory(ytest) add_to_group( LIBRARY_PL pl_library) -install(FILES ${LIBRARY_PL} DESTINATION ${libpl}) +install(FILES ${LIBRARY_PL} DESTINATION ${YAP_INSTALL_DATADIR}) if (ANDROID) -file( INSTALL ${LIBRARY_PL} DESTINATION ${libpl} ) +file( INSTALL ${LIBRARY_PL} DESTINATION ${YAP_INSTALL_DATADIR} ) endif() include_directories("dialect/swi") diff --git a/library/clp/CMakeList.txt b/library/clp/CMakeList.txt index b40c4ee9c..508180f35 100644 --- a/library/clp/CMakeList.txt +++ b/library/clp/CMakeList.txt @@ -5,7 +5,7 @@ set (LIBRARY_PL_VLP ) install(FILES ${LIBRARY_PL_CLP} - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) diff --git a/library/clp/CMakeLists.txt b/library/clp/CMakeLists.txt index 8dfbd3f99..f69d741a4 100644 --- a/library/clp/CMakeLists.txt +++ b/library/clp/CMakeLists.txt @@ -7,7 +7,7 @@ set (LIBRARY_PL_CLP add_to_group( LIBRARY_PL_CLP pl_library ) install(FILES ${LIBRARY_PL_CLP} - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) diff --git a/library/dialect/CMakeLists.txt b/library/dialect/CMakeLists.txt index c15c2651c..8c186ef9a 100644 --- a/library/dialect/CMakeLists.txt +++ b/library/dialect/CMakeLists.txt @@ -14,5 +14,5 @@ COMMAND ${CMAKE_COMMAND} -E touch visited DEPENDS ${DIALECTS_PL} ) # WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) install(FILES ${DIALECTS_PL} - DESTINATION ${libpl}/dialect + DESTINATION ${YAP_INSTALL_DATADIR}/dialect ) diff --git a/library/dialect/swi/CMakeLists.txt b/library/dialect/swi/CMakeLists.txt index bc544e9cc..e907efcec 100644 --- a/library/dialect/swi/CMakeLists.txt +++ b/library/dialect/swi/CMakeLists.txt @@ -7,5 +7,5 @@ set (SDIALECTS_PL add_SubDirectory( fli ) install(FILES ${SDIALECTS_PL} - DESTINATION ${libpl}/dialect/swi + DESTINATION ${YAP_INSTALL_DATADIR}/dialect/swi ) diff --git a/library/dialect/swi/fli/CMakeLists.txt b/library/dialect/swi/fli/CMakeLists.txt index 9be943d5c..109580f59 100644 --- a/library/dialect/swi/fli/CMakeLists.txt +++ b/library/dialect/swi/fli/CMakeLists.txt @@ -8,7 +8,7 @@ add_component (libswi MY_set_target_properties(libswi PROPERTIES - # RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION} + # RPATH ${CMAKE_INSTALL_LIBDIR} VERSION ${LIBYAPTAI_FULL_VERSION} # SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION} POSITION_INDEPENDENT_CODE ON ) diff --git a/library/dialect/swi/os/CMakeLists.txt b/library/dialect/swi/os/CMakeLists.txt index f60d0214b..6f5b2494d 100644 --- a/library/dialect/swi/os/CMakeLists.txt +++ b/library/dialect/swi/os/CMakeLists.txt @@ -58,7 +58,7 @@ add_component (libswi_os set_target_properties(libswi_os PROPERTIES - # RPATH ${libdir} VERSION ${LIBSWI_OS_FULL_VERSION} + # RPATH ${CMAKE_INSTALL_LIBDIR} VERSION ${LIBSWI_OS_FULL_VERSION} # SOVERSION ${LIBSWI_OS_MAJOR_VERSION}.${LIBSWI_OS_MINOR_VERSION} POSITION_INDEPENDENT_CODE TRUE OUTPUT_NAME swi_os diff --git a/library/dialect/swi/os/libtai/CMakeLists.txt b/library/dialect/swi/os/libtai/CMakeLists.txt index aad69f6e7..b8dda3398 100644 --- a/library/dialect/swi/os/libtai/CMakeLists.txt +++ b/library/dialect/swi/os/libtai/CMakeLists.txt @@ -45,7 +45,7 @@ add_library (libyaptai OBJECT set_target_properties(libyaptai PROPERTIES - # RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION} + # RPATH ${CMAKE_INSTALL_LIBDIR} VERSION ${LIBYAPTAI_FULL_VERSION} # SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION} POSITION_INDEPENDENT_CODE TRUE OUTPUT_NAME yaptai diff --git a/library/lammpi/CMakeLists.txt b/library/lammpi/CMakeLists.txt index 5a4451b33..74c189f4e 100644 --- a/library/lammpi/CMakeLists.txt +++ b/library/lammpi/CMakeLists.txt @@ -78,9 +78,9 @@ set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS HAVE_MPI_H=1) PUBLIC ${MPI_C_COMPILE_FLAGS}) install(TARGETS yap_mpi - RUNTIME DESTINATION ${bindir} - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) endif (MPI_C_FOUND) diff --git a/library/matlab/CMakeLists.txt b/library/matlab/CMakeLists.txt index dc124e6e0..f257f9faf 100644 --- a/library/matlab/CMakeLists.txt +++ b/library/matlab/CMakeLists.txt @@ -15,8 +15,8 @@ if (MATLAB_FOUND) target_link_libraries(matlab libYap $(MATLAB_LIBRARIES) ) install(TARGETS matlab - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} ) + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) endif (MATLAB_FOUND) diff --git a/library/matrix/CMakeLists.txt b/library/matrix/CMakeLists.txt index fae2b49e4..187fa8f3a 100644 --- a/library/matrix/CMakeLists.txt +++ b/library/matrix/CMakeLists.txt @@ -6,8 +6,8 @@ target_link_libraries(matrix libYap) set_target_properties (matrix PROPERTIES PREFIX "") install(TARGETS matrix - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} ) diff --git a/library/random/CMakeLists.txt b/library/random/CMakeLists.txt index 26d97da2a..6503599fc 100644 --- a/library/random/CMakeLists.txt +++ b/library/random/CMakeLists.txt @@ -10,5 +10,5 @@ set_target_properties (yap_random PROPERTIES PREFIX "") endif() MY_install(TARGETS yap_random - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} ) + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) diff --git a/library/regex/CMakeLists.txt b/library/regex/CMakeLists.txt index b7ec78b87..37e32e7db 100644 --- a/library/regex/CMakeLists.txt +++ b/library/regex/CMakeLists.txt @@ -26,6 +26,6 @@ TARGET_INCLUDE_DIRECTORIES (regexp PUBLIC BEFORE ${CMAKE_TOP_SOURCE_DIR}/include;${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR} ) install(TARGETS regexp - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} ) + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) diff --git a/library/rltree/CMakeLists.txt b/library/rltree/CMakeLists.txt index ee2c6c3fe..d5159263e 100644 --- a/library/rltree/CMakeLists.txt +++ b/library/rltree/CMakeLists.txt @@ -11,6 +11,6 @@ target_link_libraries(yap_rl libYap) set_target_properties (yap_rl PROPERTIES PREFIX "") install(TARGETS yap_rl - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} ) + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) diff --git a/library/system/CMakeLists.txt b/library/system/CMakeLists.txt index e3d405bda..cc891c468 100644 --- a/library/system/CMakeLists.txt +++ b/library/system/CMakeLists.txt @@ -39,8 +39,8 @@ set_target_properties (sys PROPERTIES PREFIX "") endif() MY_install(TARGETS sys - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} ) + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) configure_file ("sys_config.h.cmake" "sys_config.h" ) diff --git a/library/system/sys_config.h b/library/system/sys_config.h index ace898575..17e29d49d 100644 --- a/library/system/sys_config.h +++ b/library/system/sys_config.h @@ -5,7 +5,7 @@ /* Define to 1 if you have the header file. */ #ifndef HAVE_APR_1_APR_MD5_H -/* #undef HAVE_APR_1_APR_MD5_H */ +#define HAVE_APR_1_APR_MD5_H 1 #endif diff --git a/library/tries/CMakeLists.txt b/library/tries/CMakeLists.txt index 277df36a1..5254208f8 100644 --- a/library/tries/CMakeLists.txt +++ b/library/tries/CMakeLists.txt @@ -13,9 +13,9 @@ target_link_libraries(tries libYap) set_target_properties (tries PROPERTIES PREFIX "") install(TARGETS tries - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR}) + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR}) set ( ITRIES_SOURCES @@ -34,7 +34,7 @@ target_link_libraries(itries libYap) set_target_properties (itries PROPERTIES PREFIX "") install(TARGETS itries - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} ) + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) diff --git a/library/ytest/CMakeLists.txt b/library/ytest/CMakeLists.txt index fd7d2cc41..636309d69 100644 --- a/library/ytest/CMakeLists.txt +++ b/library/ytest/CMakeLists.txt @@ -8,5 +8,5 @@ add_custom_target (ytest_helpers SOURCES ${HELPER_PL} ) # WORKING_DIRECTORY ${CM install(FILES ${HELPER_PL} - DESTINATION ${libpl}/ytest + DESTINATION ${YAP_INSTALL_DATADIR}/ytest ) diff --git a/os/CMakeLists.txt b/os/CMakeLists.txt index 0943590de..b3b12e1f2 100644 --- a/os/CMakeLists.txt +++ b/os/CMakeLists.txt @@ -48,7 +48,7 @@ set (POSITION_INDEPENDENT_CODE TRUE) MY_set_target_properties(libYAPOs PROPERTIES - # RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION} + # RPATH ${CMAKE_INSTALL_LIBDIR} VERSION ${LIBYAPTAI_FULL_VERSION} # SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION} POSITION_INDEPENDENT_CODE TRUE ) @@ -66,8 +66,8 @@ add_to_group( YAPOS_PL_SOURCES pl_os_library) if (ANDROID) - file(INSTALL ${YAPOS_PL_SOURCES} DESTINATION ${libpl}/os) + file(INSTALL ${YAPOS_PL_SOURCES} DESTINATION ${YAP_INSTALL_DATADIR}/os) else() install (FILES ${YAPOS_PL_SOURCES} - DESTINATION ${libpl}/os ) + DESTINATION ${YAP_INSTALL_DATADIR}/os ) endif() diff --git a/packages/CLPBN/CMakeLists.txt b/packages/CLPBN/CMakeLists.txt index 65a3669be..2bf325029 100644 --- a/packages/CLPBN/CMakeLists.txt +++ b/packages/CLPBN/CMakeLists.txt @@ -100,15 +100,15 @@ ENDIF() install(FILES ${CLPBN_TOP} - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) install(FILES ${CLPBN_PL} - DESTINATION ${libpl}/clpbn + DESTINATION ${YAP_INSTALL_DATADIR}/clpbn ) install(FILES ${CLPBN_LEARNING_PROGRAMS} - DESTINATION ${libpl}/clpbn/learning + DESTINATION ${YAP_INSTALL_DATADIR}/clpbn/learning ) diff --git a/packages/CLPBN/horus/CMakeLists.txt b/packages/CLPBN/horus/CMakeLists.txt index d3234435e..d86699a32 100644 --- a/packages/CLPBN/horus/CMakeLists.txt +++ b/packages/CLPBN/horus/CMakeLists.txt @@ -69,7 +69,7 @@ if (CMAKE_MAJOR_VERSION GREATER 2) install(TARGETS horus HorusCli RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) endif() diff --git a/packages/CMakeLists.txt b/packages/CMakeLists.txt index f1738ef01..436d9f9d8 100644 --- a/packages/CMakeLists.txt +++ b/packages/CMakeLists.txt @@ -42,17 +42,17 @@ if (GECODE_FOUND) include_directories (${GECODE_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${GECODE_VERSION}) install(TARGETS gecode_yap - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gecode.yap - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) install(FILES clpfd.yap - DESTINATION ${libpl}/gecode + DESTINATION ${YAP_INSTALL_DATADIR}/gecode ) endif (GECODE_FOUND) diff --git a/packages/ProbLog/CMakeLists.txt b/packages/ProbLog/CMakeLists.txt index bdbd21341..1a5e419fb 100644 --- a/packages/ProbLog/CMakeLists.txt +++ b/packages/ProbLog/CMakeLists.txt @@ -56,11 +56,11 @@ set (LIBRARY_PL ) install(FILES ${PROGRAMS} - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) install(FILES ${PROBLOG_PROGRAMS} - DESTINATION ${libpl}/problog + DESTINATION ${YAP_INSTALL_DATADIR}/problog ) diff --git a/packages/bdd/CMakeLists.txt b/packages/bdd/CMakeLists.txt index d748929ef..38db5157d 100644 --- a/packages/bdd/CMakeLists.txt +++ b/packages/bdd/CMakeLists.txt @@ -23,7 +23,6 @@ IF (CUDD_FOUND) SET ( BDD_SOURCES cudd.c ) - ADD_LIBRARY(cudd SHARED ${BDD_SOURCES} ) INCLUDE_DIRECTORIES( @@ -49,18 +48,18 @@ IF (CUDD_FOUND) add_subdirectory(simplecudd_lfi) set(YAP_SYSTEM_OPTIONS "cudd " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE) - INSTALL(FILES ${CMAKE_BINARY_DIR}/cudd_config.h DESTINATION ${includedir}) + INSTALL(FILES ${CMAKE_BINARY_DIR}/cudd_config.h DESTINATION ${YAP_INSTALL_INCLUDEDIR}) install(TARGETS cudd - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) - INSTALL(FILES bdd.yap DESTINATION ${libpl}) - INSTALL(FILES ddnnf.yap DESTINATION ${libpl}) - INSTALL(FILES simpbool.yap DESTINATION ${libpl}) - INSTALL(FILES trie_sp.yap DESTINATION ${libpl}) + INSTALL(FILES bdd.yap DESTINATION ${YAP_INSTALL_DATADIR}) + INSTALL(FILES ddnnf.yap DESTINATION ${YAP_INSTALL_DATADIR}) + INSTALL(FILES simpbool.yap DESTINATION ${YAP_INSTALL_DATADIR}) + INSTALL(FILES trie_sp.yap DESTINATION ${YAP_INSTALL_DATADIR}) ENDIF (CUDD_FOUND) diff --git a/packages/bdd/cmake/FindYAP.cmake b/packages/bdd/cmake/FindYAP.cmake index 8e361b986..79a5ec7fa 100644 --- a/packages/bdd/cmake/FindYAP.cmake +++ b/packages/bdd/cmake/FindYAP.cmake @@ -5,9 +5,9 @@ if (YAP_ROOT) set( YAP_INCLUDE_DIR ../../include ) - set( YAP_PL_LIBRARY_DIR ${libpl} ) + set( YAP_PL_LIBRARY_DIR ${YAP_INSTALL_DATADIR} ) set( YAP_LIBRARY libYap ) - set( YAP_DLLS ${YAP_INSTALL_DLLDIR} ) + set( YAP_DLLS ${YAP_INSTALL_LIBDIR} ) else() diff --git a/packages/bdd/simplecudd/CMakeLists.txt b/packages/bdd/simplecudd/CMakeLists.txt index 459e0be8a..19efb8c08 100644 --- a/packages/bdd/simplecudd/CMakeLists.txt +++ b/packages/bdd/simplecudd/CMakeLists.txt @@ -26,6 +26,6 @@ target_link_libraries(Problogbdd install(TARGETS Problogbdd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} ) diff --git a/packages/bdd/simplecudd_lfi/CMakeLists.txt b/packages/bdd/simplecudd_lfi/CMakeLists.txt index b2ff0e0c3..5d354ec0d 100644 --- a/packages/bdd/simplecudd_lfi/CMakeLists.txt +++ b/packages/bdd/simplecudd_lfi/CMakeLists.txt @@ -30,6 +30,6 @@ target_link_libraries(Problogbdd-Lfi install(TARGETS Problogbdd-Lfi RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} ) diff --git a/packages/clpqr/CMakeLists.txt b/packages/clpqr/CMakeLists.txt index f040f695d..b66383937 100644 --- a/packages/clpqr/CMakeLists.txt +++ b/packages/clpqr/CMakeLists.txt @@ -19,7 +19,7 @@ set (CLPQRPRIV clpqr/class.pl clpqr/dump.pl clpqr/project.pl clpqr/redund.pl) set (LIBPL clpr.pl clpq.pl ${CLPRPRIV} ${CLPQPRIV} ${CLPQRPRIV} ) -install ( FILES ${LIBPL} DESTINATION ${libpl} ) +install ( FILES ${YAP_INSTALL_DATADIR} DESTINATION ${YAP_INSTALL_DATADIR} ) # $(PL) -q -f $(srcdir)/clpr_test.pl -g test,halt -t 'halt(1)' diff --git a/packages/cplint/CMakeLists.txt b/packages/cplint/CMakeLists.txt index bda489574..01e2af35d 100644 --- a/packages/cplint/CMakeLists.txt +++ b/packages/cplint/CMakeLists.txt @@ -148,9 +148,9 @@ IF (CUDD_FOUND) ) install(TARGETS bddem - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) @@ -171,15 +171,15 @@ IF (CUDD_FOUND) add_subDIRECTORY ( approx/simplecuddLPADs ) install(TARGETS cplint - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) - INSTALL(FILES ${CPLINT_PROGRAMS} DESTINATION ${libpl}) - INSTALL(FILES ${CPLINT_LEARNING_PROGRAMS} DESTINATION ${libpl}/cplint) - INSTALL(FILES ${CPLINT_EXAMPLE_PROGRAMS} DESTINATION ${libpl}/cplint/examples) - INSTALL(FILES ${CPLINT_TEST_PROGRAMS} DESTINATION ${libpl}/cplint/examples) - INSTALL(FILES ${CPLINT_SEMANTICS_PROGRAMS} DESTINATION ${libpl}) + INSTALL(FILES ${CPLINT_PROGRAMS} DESTINATION ${YAP_INSTALL_DATADIR}) + INSTALL(FILES ${CPLINT_LEARNING_PROGRAMS} DESTINATION ${YAP_INSTALL_DATADIR}/cplint) + INSTALL(FILES ${CPLINT_EXAMPLE_PROGRAMS} DESTINATION ${YAP_INSTALL_DATADIR}/cplint/examples) + INSTALL(FILES ${CPLINT_TEST_PROGRAMS} DESTINATION ${YAP_INSTALL_DATADIR}/cplint/examples) + INSTALL(FILES ${CPLINT_SEMANTICS_PROGRAMS} DESTINATION ${YAP_INSTALL_DATADIR}) ENDIF() diff --git a/packages/cplint/approx/simplecuddLPADs/CMakeLists.txt b/packages/cplint/approx/simplecuddLPADs/CMakeLists.txt index 30d33533c..1a1bf4f57 100644 --- a/packages/cplint/approx/simplecuddLPADs/CMakeLists.txt +++ b/packages/cplint/approx/simplecuddLPADs/CMakeLists.txt @@ -27,6 +27,6 @@ target_link_libraries(LPADbdd install(TARGETS LPADbdd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} ) diff --git a/packages/cuda/CMakeLists.txt b/packages/cuda/CMakeLists.txt index d7b5c7353..1582d0dca 100644 --- a/packages/cuda/CMakeLists.txt +++ b/packages/cuda/CMakeLists.txt @@ -103,12 +103,12 @@ endif( THRUST_INCLUDE_DIR ) ) install(TARGETS libcuda - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) install(FILES ${PL_SOURCES} - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) diff --git a/packages/gecode/CMakeLists.txt b/packages/gecode/CMakeLists.txt index 0e328a2f5..8257f1fa7 100644 --- a/packages/gecode/CMakeLists.txt +++ b/packages/gecode/CMakeLists.txt @@ -42,17 +42,17 @@ if (GECODE_FOUND) include_directories (${GECODE_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${GECODE_VERSION}) install(TARGETS gecode_yap - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gecode.yap - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) install(FILES clpfd.yap - DESTINATION ${libpl}/gecode + DESTINATION ${YAP_INSTALL_DATADIR}/gecode ) endif (GECODE_FOUND) diff --git a/packages/jpl/CMakeLists.txt b/packages/jpl/CMakeLists.txt index 5d7499eba..391ea64da 100644 --- a/packages/jpl/CMakeLists.txt +++ b/packages/jpl/CMakeLists.txt @@ -16,7 +16,7 @@ if (Java_Development_FOUND) add_subdirectory (src/java) install(FILES jpl.pl - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) endif (Java_Development_FOUND) diff --git a/packages/jpl/jpl.pl b/packages/jpl/jpl.pl index 43b99385c..39e99119f 100644 --- a/packages/jpl/jpl.pl +++ b/packages/jpl/jpl.pl @@ -4701,11 +4701,11 @@ java_home(Home) :- setup_jvm :- jvm_ready, !. setup_jvm :- - check_java_libs(JVM, Java), + check_java_libs(_JVM, _Java), add_jpl_to_classpath, libjpl(JPL), add_jpl_to_ldpath(JPL,FullJPL), - catch(load_absolute_foreign_files([FullJPL],[Java,JVM],install), E, report_java_setup_problem(E)), + catch(load_absolute_foreign_files([FullJPL],[],install), E, report_java_setup_problem(E)), assert(jvm_ready). report_java_setup_problem(E) :- diff --git a/packages/jpl/src/c/CMakeLists.txt b/packages/jpl/src/c/CMakeLists.txt index 2d37e305c..5c309c77e 100644 --- a/packages/jpl/src/c/CMakeLists.txt +++ b/packages/jpl/src/c/CMakeLists.txt @@ -5,22 +5,7 @@ add_lib(jplYap jpl.h jpl.c hacks.h) include_directories (${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} ${JAVA_AWT_PATH} ) - get_filename_component ( JAVA_AWT_DIR ${JAVA_AWT_LIBRARY} DIRECTORY) - get_filename_component ( JAVA_JNI_DIR ${JAVA_JVM_LIBRARY} DIRECTORY) - list(APPEND CMAKE_INSTALL_RPATH ${JAVA_AWT_DIR};${JAVA_JNI_DIR}) - -if (APPLE) - set(CMAKE_MACOSX_RPATH 1) - find_library (JLI jli ${JAVA_AWT_DIR}/jli) - find_library (JAL JavaApplicationLauncher FRAMEWORK ONLY PATH /System/Library/PrivateFrameworks) - find_library (JL JavaLaunching FRAMEWORK ONLY PATH /System/Library/PrivateFrameworks) - list(APPEND CMAKE_INSTALL_RPATH ${JAVA_AWT_DIR}/jli) - target_link_libraries(jplYap libYap ${JL} ${JAL} -L${JAVA_AWT_DIR}/jli -ljli ) -else() - target_link_libraries(jplYap libYap ${JAVA_JVM_LIBRARY}) - -endif() - + target_link_libraries(jplYap libYap ${JNI_LIBRARIES}) set_target_properties(jplYap PROPERTIES OUTPUT_NAME jpl @@ -28,7 +13,7 @@ endif() # set(YAP_SYSTEM_OPTIONS "jpl " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE) install(TARGETS jplYap - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) diff --git a/packages/jpl/src/java/CMakeLists.txt b/packages/jpl/src/java/CMakeLists.txt index 428b779d6..c43dd6460 100644 --- a/packages/jpl/src/java/CMakeLists.txt +++ b/packages/jpl/src/java/CMakeLists.txt @@ -81,4 +81,4 @@ add_jar(jpl SOURCES ${JPLJAVA} OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) -install_jar(jpl ${libpl} ) +install_jar(jpl ${YAP_INSTALL_DATADIR} ) diff --git a/packages/myddas/mysql/CMakeLists.txt b/packages/myddas/mysql/CMakeLists.txt index ec188b0e0..11ea1a432 100644 --- a/packages/myddas/mysql/CMakeLists.txt +++ b/packages/myddas/mysql/CMakeLists.txt @@ -27,9 +27,9 @@ if (WITH_MYSQL) add_lib(YAPmysql ${MYSQL_SOURCES}) target_link_libraries(YAPmysql ${MYSQL_LIBRARIES} libYap) install(TARGETS YAPmysql - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} ) endif() include_directories(${MYSQL_INCLUDE_DIR} ..) diff --git a/packages/myddas/odbc/CMakeLists.txt b/packages/myddas/odbc/CMakeLists.txt index cc9319d2d..10f569118 100644 --- a/packages/myddas/odbc/CMakeLists.txt +++ b/packages/myddas/odbc/CMakeLists.txt @@ -30,9 +30,9 @@ if (WITH_ODBC) install(TARGETS YAPodbc - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) else() diff --git a/packages/myddas/pl/CMakeLists.txt b/packages/myddas/pl/CMakeLists.txt index ff423bcbb..24caee6aa 100644 --- a/packages/myddas/pl/CMakeLists.txt +++ b/packages/myddas/pl/CMakeLists.txt @@ -14,7 +14,7 @@ set(MYDDAS_DRIVERS if (ANDROID) - set (MYDDAS_PREFIX ${libpl} ) + set (MYDDAS_PREFIX ${YAP_INSTALL_DATADIR} ) else() set (MYDDAS_PREFIX ${CMAKE_CURRENT_BINARY_DIR} ) endif() @@ -78,5 +78,5 @@ add_to_group(MYDDAS_YAP pl_library ) add_custom_target(plmyddas ALL DEPENDS ${MYDDAS_YAP} ) install(FILES ${MYDDAS_YAP} - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) diff --git a/packages/myddas/postgres/CMakeLists.txt b/packages/myddas/postgres/CMakeLists.txt index edca3cfe6..fcdd547fd 100644 --- a/packages/myddas/postgres/CMakeLists.txt +++ b/packages/myddas/postgres/CMakeLists.txt @@ -30,9 +30,9 @@ if (WITH_POSTGRES) -DMYDDAS_POSTGRES=1) install(TARGETS YAPpostgres - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) endif (PostgreSQL_FOUND) diff --git a/packages/myddas/sqlite3/CMakeLists.txt b/packages/myddas/sqlite3/CMakeLists.txt index b78cb4501..123e8a22c 100644 --- a/packages/myddas/sqlite3/CMakeLists.txt +++ b/packages/myddas/sqlite3/CMakeLists.txt @@ -52,21 +52,21 @@ if (WITH_SQLITE3) set_target_properties(YAPsqlite3 PROPERTIES - # RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION} + # RPATH ${CMAKE_INSTALL_LIBDIR} VERSION ${LIBYAPTAI_FULL_VERSION} # SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION} POSITION_INDEPENDENT_CODE ON PREFIX "" ) install(TARGETS YAPsqlite3 - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} ) endif() install(FILES ${SQLITE_EXTRA} - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) endif() diff --git a/packages/python/CMakeLists.txt b/packages/python/CMakeLists.txt index 550dc5e78..c6f8e6b8f 100644 --- a/packages/python/CMakeLists.txt +++ b/packages/python/CMakeLists.txt @@ -28,9 +28,9 @@ target_link_libraries(Py4YAP libYap ${PYTHON_LIBRARIES}) install(TARGETS Py4YAP - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) @@ -46,13 +46,13 @@ set_property( SOURCE ${PYTHON_SOURCES} APPEND PROPERTY COMPILE_DEFINITIONS YA set (PYTHON_PL python.pl) -install(FILES python.pl DESTINATION ${libpl} ) +install(FILES python.pl DESTINATION ${YAP_INSTALL_DATADIR} ) add_to_group( PYTHON_PL pl_library ) set_target_properties (YAPPython PROPERTIES PREFIX "") install(TARGETS YAPPython - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} ) + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) diff --git a/packages/python/swig/CMakeLists.txt b/packages/python/swig/CMakeLists.txt index 383a2bb09..6c607c007 100644 --- a/packages/python/swig/CMakeLists.txt +++ b/packages/python/swig/CMakeLists.txt @@ -73,10 +73,10 @@ endif() COMMAND ${PYTHON_EXECUTABLE} setup.py sdist ${bdist} COMMAND ${PYTHON_EXECUTABLE} -m pip install ${PYTHON_USER_INSTALL} --ignore-installed . WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})" - DEPENDS Py4YAP ${CMAKE_BINARY_DIR}/${YAP_STARTUP} ${YAP_INSTALL_DLLDIR} ) + DEPENDS Py4YAP ${CMAKE_BINARY_DIR}/${YAP_STARTUP} ${YAP_INSTALL_LIBDIR} ) -install(FILES ${YAP4PY_PL} DESTINATION ${libpl} ) +install(FILES ${YAP4PY_PL} DESTINATION ${YAP_INSTALL_DATADIR} ) add_to_group( YAP4PY_PL pl_library ) diff --git a/packages/python/swig/setup.py b/packages/python/swig/setup.py index f4e0fddf3..23c49be72 100644 --- a/packages/python/swig/setup.py +++ b/packages/python/swig/setup.py @@ -58,18 +58,18 @@ here = path.abspath(path.dirname(__file__)) sys.path.insert(0, "/home/vsc/github/yap-6.3/packages/python/swig") -python_libdir = path.abspath(path.dirname("/usr/lib/x86_64-linux-gnu/libpython3.6m.so")) +python_libdir = path.abspath(path.dirname("/usr/lib/libpython3.7m.so")) if platform.system() == 'Windows': local_libs = [] win_libs = ['wsock32','ws2_32'] my_extra_link_args = ['-Wl,-export-all-symbols'] elif platform.system() == 'Darwin': - my_extra_link_args = ['-L','..','-Wl,-rpath,'+abspath(join(sysconfig.get_path('platlib'),'yap4py')),'-Wl,-rpath,/lib','-Wl,-rpath,../yap4py'] + my_extra_link_args = ['-L','..','-Wl,-rpath,'+abspath(join(sysconfig.get_path('platlib'),'yap4py')),'-Wl,-rpath,/usr/local/lib','-Wl,-rpath,../yap4py'] win_libs = [] local_libs = ['Py4YAP'] elif platform.system() == 'Linux': - my_extra_link_args = ['-L','..','-Wl,-rpath,'+abspath(join(sysconfig.get_path('platlib'),'yap4py')),'-Wl,-rpath,/lib','-Wl,-rpath,'+join('/lib','..'),'-Wl,-rpath,../yap4py'] + my_extra_link_args = ['-L','..','-Wl,-rpath,'+abspath(join(sysconfig.get_path('platlib'),'yap4py')),'-Wl,-rpath,/usr/local/lib','-Wl,-rpath,'+join('/usr/local/lib','..'),'-Wl,-rpath,../yap4py'] win_libs = [] local_libs = ['Py4YAP'] @@ -78,22 +78,23 @@ elif platform.system() == 'Linux': native_sources = ["yap4py/yap_wrap.cxx","yap4py/yapi.cpp"] -#gmp_dir = path.abspath(path.dirname("/usr/lib/x86_64-linux-gnu/libgmp.so")) +#gmp_dir = path.abspath(path.dirname("/lib/libgmp.so")) # Get the long description from the README file extensions = [Extension('_yap', native_sources, - define_macros=[('MAJOR_VERSION', '1'), - ('MINOR_VERSION', '0'), + define_macros=[('MAJOR_VERSION', '6'), + ('MINOR_VERSION', '4'), ('_YAP_NOT_INSTALLED_', '1'), ('YAP_PYTHON', '1'), + ('PYTHONSWIG', '1'), ('_GNU_SOURCE', '1')], runtime_library_dirs=[ - abspath(join(sysconfig.get_path('platlib'),'yap4py')), abspath(sysconfig.get_path('platlib')),'/lib'], + abspath(join(sysconfig.get_path('platlib'),'yap4py')), abspath(sysconfig.get_path('platlib')),'/usr/local/lib'], swig_opts=['-modern', '-c++', '-py3', '-DX_API', '-Iyap4py/include' ], - library_dirs=[".",'../../..','/lib'], + library_dirs=[".",'../../..','/usr/local/lib'], extra_link_args=my_extra_link_args, libraries=['Yap','gmp']+win_libs+local_libs, include_dirs=['/home/vsc/github/yap-6.3/H', @@ -103,7 +104,7 @@ extensions = [Extension('_yap', native_sources, '/home/vsc/github/yap-6.3/os', '/home/vsc/github/yap-6.3/utf8proc', '/home/vsc/github/yap-6.3/packages/python', - '../../..', + '/home/vsc/github/yap-6.3', '/home/vsc/github/yap-6.3/CXX' ] )] @@ -114,7 +115,7 @@ package_data = { data_files=[] -version_ns = {'__version__': '6.3.5', 'minor-version': '6', 'minor-version': '3', 'patch': '5'} +version_ns = {'__version__': '6.4.1', 'major-version': '6', 'minor-version': '4', 'patch': '1'} setup_args = dict( name=name, diff --git a/packages/python/yap_kernel/CMakeLists.txt b/packages/python/yap_kernel/CMakeLists.txt index 5eb32266e..df7f221fb 100644 --- a/packages/python/yap_kernel/CMakeLists.txt +++ b/packages/python/yap_kernel/CMakeLists.txt @@ -440,4 +440,4 @@ add_custom_target(YAP_KERNEL ALL OUTPUT_VARIABLE setupOut WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") - install(FILES ${PL_SOURCES} DESTINATION ${libpl} ) + install(FILES ${PL_SOURCES} DESTINATION ${YAP_INSTALL_DATADIR} ) diff --git a/packages/raptor/CMakeLists.txt b/packages/raptor/CMakeLists.txt index 37da50b7d..769172279 100644 --- a/packages/raptor/CMakeLists.txt +++ b/packages/raptor/CMakeLists.txt @@ -54,9 +54,9 @@ else (WIN32) endif() install(TARGETS libxml2 - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${libdir} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) endif(WIN32) @@ -67,7 +67,7 @@ endif(WIN32) set_target_properties (libxml2 PROPERTIES PREFIX "") - INSTALL(FILES xml2.yap DESTINATION ${libpl}) + INSTALL(FILES xml2.yap DESTINATION ${YAP_INSTALL_DATADIR}) ENDIF (LIBXML2_FOUND) @@ -109,14 +109,14 @@ IF (RAPTOR_FOUND) set_target_properties (raptor PROPERTIES PREFIX "") install(TARGETS raptor - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${libdir} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) - INSTALL(FILES raptor.yap DESTINATION ${libpl}) - INSTALL(FILES rdf.yap DESTINATION ${libpl}) + INSTALL(FILES raptor.yap DESTINATION ${YAP_INSTALL_DATADIR}) + INSTALL(FILES rdf.yap DESTINATION ${YAP_INSTALL_DATADIR}) configure_file ("raptor_config.h.cmake" "raptor_config.h" ) diff --git a/packages/raptor/cmake/FindYAP.cmake b/packages/raptor/cmake/FindYAP.cmake index 8e361b986..79a5ec7fa 100644 --- a/packages/raptor/cmake/FindYAP.cmake +++ b/packages/raptor/cmake/FindYAP.cmake @@ -5,9 +5,9 @@ if (YAP_ROOT) set( YAP_INCLUDE_DIR ../../include ) - set( YAP_PL_LIBRARY_DIR ${libpl} ) + set( YAP_PL_LIBRARY_DIR ${YAP_INSTALL_DATADIR} ) set( YAP_LIBRARY libYap ) - set( YAP_DLLS ${YAP_INSTALL_DLLDIR} ) + set( YAP_DLLS ${YAP_INSTALL_LIBDIR} ) else() diff --git a/packages/real/CMakeLists.txt b/packages/real/CMakeLists.txt index 0a4b1ae32..ba6a37a26 100644 --- a/packages/real/CMakeLists.txt +++ b/packages/real/CMakeLists.txt @@ -38,13 +38,13 @@ include_directories ( configure_file ("rconfig.h.cmake" "rconfig.h" ) install(TARGETS real - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} ) install(FILES real.pl - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) endif() diff --git a/packages/swi-minisat2/C/CMakeLists.txt b/packages/swi-minisat2/C/CMakeLists.txt index ab7b9b57e..e14a6216b 100644 --- a/packages/swi-minisat2/C/CMakeLists.txt +++ b/packages/swi-minisat2/C/CMakeLists.txt @@ -44,8 +44,8 @@ pl-minisat.C install ( TARGETS minisat2 RUNTIME DESTINATION ${CMAKE_INSTALL_BIINDIR} - ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR} - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} ) diff --git a/packages/swi-minisat2/CMakeLists.txt b/packages/swi-minisat2/CMakeLists.txt index 8795ff2ff..b39ad2491 100644 --- a/packages/swi-minisat2/CMakeLists.txt +++ b/packages/swi-minisat2/CMakeLists.txt @@ -11,7 +11,7 @@ set (EXAMPLE_PROGRAMS install(FILES ${PROGRAMS} - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) add_subDIRECTORY (C) diff --git a/packages/swig/android/CMakeLists.txt b/packages/swig/android/CMakeLists.txt index 418654c62..7a546de3f 100644 --- a/packages/swig/android/CMakeLists.txt +++ b/packages/swig/android/CMakeLists.txt @@ -18,20 +18,20 @@ FILE( MAKE_DIRECTORY ${YAP_APP_DIR}/src/generated/jni) add_custom_target (pllib - COMMAND ${CMAKE_COMMAND} -E make_directory ${pllib} - COMMAND ${CMAKE_COMMAND} -E copy ${pl_library} ${pllib} - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/android.yap ${pllib} + COMMAND ${CMAKE_COMMAND} -E make_directory ${YAP_INSTALL_DATADIR} + COMMAND ${CMAKE_COMMAND} -E copy ${pl_library} ${YAP_INSTALL_DATADIR} + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/android.yap ${YAP_INSTALL_DATADIR} DEPENDS ${pl_library} ) add_custom_target (pllibpl - COMMAND ${CMAKE_COMMAND} -E make_directory ${pllib}/pl - COMMAND ${CMAKE_COMMAND} -E copy ${pl_boot_library} ${pllib}/pl + COMMAND ${CMAKE_COMMAND} -E make_directory ${YAP_INSTALL_DATADIR}/pl + COMMAND ${CMAKE_COMMAND} -E copy ${pl_boot_library} ${YAP_INSTALL_DATADIR}/pl DEPENDS pllib ${pl_boot_library} ) add_custom_target (pllibos ALL - COMMAND ${CMAKE_COMMAND} -E make_directory ${pllib}/os - COMMAND ${CMAKE_COMMAND} -E copy ${pl_os_library} ${pllib}/os + COMMAND ${CMAKE_COMMAND} -E make_directory ${YAP_INSTALL_DATADIR}/os + COMMAND ${CMAKE_COMMAND} -E copy ${pl_os_library} ${YAP_INSTALL_DATADIR}/os DEPENDS pllibpl ${pl_os_library} ) diff --git a/packages/swig/java/CMakeLists.txt b/packages/swig/java/CMakeLists.txt index 1bb2f248e..12a7f3b5f 100644 --- a/packages/swig/java/CMakeLists.txt +++ b/packages/swig/java/CMakeLists.txt @@ -45,7 +45,7 @@ if (JNI_FOUND) DEPENDS Native PROPERTIES OUTPUT_NAME Native ) - install_jar(NativeJar ${libpl}) + install_jar(NativeJar ${YAP_INSTALL_DATADIR}) add_dependencies(NativeJar Native ) #install_jni_symlink(NativeJar .) @@ -65,12 +65,12 @@ if (JNI_FOUND) SET(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.8" "-target" "1.8") install( TARGETS Native RUNTIME DESTINATION ${CMAKE_INSTALL_BIINDIR} - ARCHIVE DESTINATION ${libdir} - LIBRARY DESTINATION ${libdir} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -install_jar(JavaYAP ${libpl}) -#install_jni_symlink(JavaYAP ${libpl}) +install_jar(JavaYAP ${YAP_INSTALL_DATADIR}) +#install_jni_symlink(JavaYAP ${YAP_INSTALL_DATADIR}) diff --git a/packages/swig/js/CMakeLists.txt b/packages/swig/js/CMakeLists.txt index 4b9f6742b..874bf3866 100644 --- a/packages/swig/js/CMakeLists.txt +++ b/packages/swig/js/CMakeLists.txt @@ -56,7 +56,7 @@ if (Java_Development_FOUND) DEPENDS Native PROPERTIES OUTPUT_NAME Native ) - install_jar(NativeJar ${libpl}) + install_jar(NativeJar ${YAP_INSTALL_DATADIR}) add_dependencies(NativeJar Native ) #install_jni_symlink(NativeJar .) @@ -73,15 +73,15 @@ if (Java_Development_FOUND) SOURCES "JavaYAP.java" ENTRY_POINT JavaYAP INCLUDE_JARS NativeJar ) - SET(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.8" "-target" "1.8") + SET(CMAKE_JAVA_COMPILE_FLAGS) install( TARGETS Native - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${libdir} - LIBRARY DESTINATION ${libdir} + RUNTIME DESTINATION ${CMAKE_INSTALL_DLLDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_DLLDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_DLLDIR} ) -install_jar(JavaYAP ${libpl}) -#install_jni_symlink(JavaYAP ${libpl}) +install_jar(JavaYAP ${YAP_INSTALL_DATADIR}) +#install_jni_symlink(JavaYAP ${YAP_INSTALL_DATADIR}) diff --git a/packages/xml/CMakeLists.txt b/packages/xml/CMakeLists.txt index 377513132..553f3cefc 100644 --- a/packages/xml/CMakeLists.txt +++ b/packages/xml/CMakeLists.txt @@ -37,9 +37,9 @@ add_custom_target (xmlpl SOURCES ${XML_PL} ${LIBRARY_PL} ) # WORKING_DIRECTORY $ install(FILES ${LIBRARY_PL} - DESTINATION ${libpl}/xml + DESTINATION ${YAP_INSTALL_DATADIR}/xml ) install(FILES ${XML_PL} - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) diff --git a/packages/yap-lbfgs/CMakeLists.txt b/packages/yap-lbfgs/CMakeLists.txt index de3695233..77b515732 100644 --- a/packages/yap-lbfgs/CMakeLists.txt +++ b/packages/yap-lbfgs/CMakeLists.txt @@ -35,11 +35,11 @@ ENDIF (NOT YAP_FOUND) install(TARGETS LBFGS - LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR} - RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR} - ARCHIVE DESTINATION ${libdir} + LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR} + RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR} ) - INSTALL(FILES lbfgs.pl DESTINATION ${libpl}) + INSTALL(FILES lbfgs.pl DESTINATION ${YAP_INSTALL_DATADIR}) diff --git a/pl/CMakeLists.txt b/pl/CMakeLists.txt index 2c45836f8..d44f3d11e 100644 --- a/pl/CMakeLists.txt +++ b/pl/CMakeLists.txt @@ -68,7 +68,7 @@ if (ANDROID) add_custom_target(STARTUP DEPENDS ${PL_BOOT_SOURCES} ) - file (INSTALL ${PL_BOOT_SOURCES} DESTINATION ${libpl}/pl) + file (INSTALL ${PL_BOOT_SOURCES} DESTINATION ${YAP_INSTALL_DATADIR}/pl) elseif(CMAKE_CROSSCOMPILING) add_custom_target(STARTUP ALL SOURCES DEPENDS ${PL_BOOT_SOURCES} @@ -89,11 +89,11 @@ else () install(FILES ${CMAKE_TOP_BINARY_DIR}/${YAP_STARTUP} - DESTINATION ${YAP_INSTALL_DLLDIR} + DESTINATION ${YAP_INSTALL_LIBDIR} ) endif() install(FILES ${PL_BOOT_SOURCES} - DESTINATION ${libpl}/pl + DESTINATION ${YAP_INSTALL_DATADIR}/pl ) diff --git a/swi/library/CMakeLists.txt b/swi/library/CMakeLists.txt index be282d6bf..a597c0649 100644 --- a/swi/library/CMakeLists.txt +++ b/swi/library/CMakeLists.txt @@ -38,11 +38,11 @@ set (LIBRARY_PL if (ANDROID) - file(INSTALL ${LIBRARY_PL} DESTINATION ${libpl}) + file(INSTALL ${LIBRARY_PL} DESTINATION ${YAP_INSTALL_DATADIR}) endif() install(FILES ${LIBRARY_PL} - DESTINATION ${libpl} + DESTINATION ${YAP_INSTALL_DATADIR} ) add_to_group( LIBRARY_PL pl_library )