149 lines
7.6 KiB
Diff
149 lines
7.6 KiB
Diff
diff -rupN med-3.3.1_SRC/CMakeLists.txt med-3.3.1_SRC-new/CMakeLists.txt
|
|
--- med-3.3.1_SRC/CMakeLists.txt 2017-10-31 17:16:37.000000000 +0100
|
|
+++ med-3.3.1_SRC-new/CMakeLists.txt 2018-03-09 23:47:41.350576393 +0100
|
|
@@ -81,9 +81,9 @@ ENDIF(WIN32)
|
|
IF(WIN32 AND NOT CYGWIN)
|
|
SET(INSTALL_CMAKE_CONFIG_DIR cmake)
|
|
ELSE()
|
|
- SET(INSTALL_CMAKE_CONFIG_DIR share/cmake/${PROJECT_NAME})
|
|
+ SET(INSTALL_CMAKE_CONFIG_DIR lib${LIB_SUFFIX}/cmake/${PROJECT_NAME})
|
|
ENDIF()
|
|
-SET(INSTALL_INCLUDE_DIR include)
|
|
+SET(INSTALL_INCLUDE_DIR include/med)
|
|
|
|
## Pre-requisites detection
|
|
# Detect HDF5 first to potentially retrieve MPI automatically:
|
|
diff -rupN med-3.3.1_SRC/config/cmake_files/medMacros.cmake med-3.3.1_SRC-new/config/cmake_files/medMacros.cmake
|
|
--- med-3.3.1_SRC/config/cmake_files/medMacros.cmake 2017-10-11 15:02:22.000000000 +0200
|
|
+++ med-3.3.1_SRC-new/config/cmake_files/medMacros.cmake 2018-03-09 23:39:44.704602757 +0100
|
|
@@ -455,9 +455,9 @@ MACRO(INSTALL_AND_COMPILE_PYTHON_FILE PY
|
|
FOREACH(input ${PYFILE2COMPINST})
|
|
GET_FILENAME_COMPONENT(inputname ${input} NAME)
|
|
INSTALL(FILES ${input} DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYFILELOC})
|
|
- INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}\")")
|
|
- INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")")
|
|
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")")
|
|
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")")
|
|
+ #INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}\")")
|
|
+ #INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")")
|
|
+ #INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")")
|
|
+ #INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")")
|
|
ENDFOREACH(input ${PYFILE2COMPINST})
|
|
ENDMACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC)
|
|
diff -rupN med-3.3.1_SRC/python/CMakeLists.txt med-3.3.1_SRC-new/python/CMakeLists.txt
|
|
--- med-3.3.1_SRC/python/CMakeLists.txt 2017-07-10 14:50:32.000000000 +0200
|
|
+++ med-3.3.1_SRC-new/python/CMakeLists.txt 2018-03-09 23:39:44.704602757 +0100
|
|
@@ -35,7 +35,7 @@ SET(_link_libs
|
|
${PYTHON_LIBRARIES}
|
|
)
|
|
|
|
-SET(_install_dir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/med)
|
|
+SET(_install_dir lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/med)
|
|
|
|
# Ensure we will be able to run the Python tests from the build tree by outputing
|
|
# files into the package folder:
|
|
diff -rupN med-3.3.1_SRC/src/CMakeLists.txt med-3.3.1_SRC-new/src/CMakeLists.txt
|
|
--- med-3.3.1_SRC/src/CMakeLists.txt 2016-04-14 18:27:38.000000000 +0200
|
|
+++ med-3.3.1_SRC-new/src/CMakeLists.txt 2018-03-09 23:43:23.198590672 +0100
|
|
@@ -77,10 +77,11 @@ SET(_export_group "medfileTargets")
|
|
######### Shared Libraries ##########
|
|
IF(MEDFILE_BUILD_SHARED_LIBS)
|
|
ADD_LIBRARY(medC SHARED ${medC_SOURCES})
|
|
+ SET_TARGET_PROPERTIES(medC PROPERTIES VERSION ${LIBMEDC_LIBVER} SOVERSION ${LIBMEDC_SOVER})
|
|
TARGET_LINK_LIBRARIES(medC ${HDF5_LIBRARIES} ${MPI_LIBS})
|
|
MED_SET_DEFINITIONS(medC NOGDI)
|
|
|
|
- INSTALL(TARGETS medC EXPORT ${_export_group} DESTINATION lib)
|
|
+ INSTALL(TARGETS medC EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})
|
|
ENDIF()
|
|
|
|
######### Static Libraries ##########
|
|
@@ -94,7 +95,7 @@ IF(MEDFILE_BUILD_STATIC_LIBS)
|
|
TARGET_LINK_LIBRARIES(medC_static ${HDF5_LIBRARIES} ${MPI_LIBS})
|
|
MED_SET_DEFINITIONS(medC_static NOGDI)
|
|
|
|
- INSTALL(TARGETS medC_static EXPORT ${_export_group} DESTINATION lib)
|
|
+ INSTALL(TARGETS medC_static EXPORT ${_export_group} DESTINATION lib${LIB_SUFFIX})
|
|
ENDIF()
|
|
|
|
########################### Fortran stuff ###################################
|
|
@@ -107,14 +108,15 @@ IF(CMAKE_Fortran_COMPILER_WORKS)
|
|
## if we want the Fortran wrapper to build correctly under win.
|
|
ADD_LIBRARY(medfwrap STATIC ${medfort_wrap_SOURCES})
|
|
TARGET_LINK_LIBRARIES(medfwrap medC)
|
|
- INSTALL(TARGETS medfwrap EXPORT medfileTargetsF DESTINATION lib)
|
|
+ INSTALL(TARGETS medfwrap EXPORT medfileTargetsF DESTINATION lib${LIB_SUFFIX})
|
|
|
|
# Add Shared MED library
|
|
ADD_LIBRARY(med SHARED MEDiterators.c)
|
|
+ SET_TARGET_PROPERTIES(med PROPERTIES VERSION ${LIBMED_LIBVER} SOVERSION ${LIBMED_SOVER})
|
|
TARGET_LINK_LIBRARIES(med medfwrap)
|
|
|
|
# Install only the resulting library:
|
|
- INSTALL(TARGETS med EXPORT medTargetsF DESTINATION lib)
|
|
+ INSTALL(TARGETS med EXPORT medTargetsF DESTINATION lib${LIB_SUFFIX})
|
|
ENDIF()
|
|
|
|
######### Static Libraries ##########
|
|
@@ -127,7 +129,7 @@ IF(CMAKE_Fortran_COMPILER_WORKS)
|
|
ADD_LIBRARY(medfwrap_static STATIC ${medfort_wrap_SOURCES})
|
|
SET_TARGET_PROPERTIES(medfwrap_static PROPERTIES OUTPUT_NAME medfwrap)
|
|
TARGET_LINK_LIBRARIES(medfwrap_static medC_static)
|
|
- INSTALL(TARGETS medfwrap_static EXPORT medfileTargetsF DESTINATION lib)
|
|
+ INSTALL(TARGETS medfwrap_static EXPORT medfileTargetsF DESTINATION lib${LIB_SUFFIX})
|
|
|
|
# Add Static MED library
|
|
ADD_LIBRARY(med_static STATIC MEDiterators.c)
|
|
@@ -135,7 +137,7 @@ IF(CMAKE_Fortran_COMPILER_WORKS)
|
|
TARGET_LINK_LIBRARIES(med_static medfwrap_static)
|
|
|
|
# Install only the resulting library:
|
|
- INSTALL(TARGETS med_static EXPORT medfileTargetsF DESTINATION lib)
|
|
+ INSTALL(TARGETS med_static EXPORT medfileTargetsF DESTINATION lib${LIB_SUFFIX})
|
|
ENDIF()
|
|
|
|
ENDIF(CMAKE_Fortran_COMPILER_WORKS)
|
|
diff -rupN med-3.3.1_SRC/tests/python/CMakeLists.txt med-3.3.1_SRC-new/tests/python/CMakeLists.txt
|
|
--- med-3.3.1_SRC/tests/python/CMakeLists.txt 2016-04-17 21:27:12.000000000 +0200
|
|
+++ med-3.3.1_SRC-new/tests/python/CMakeLists.txt 2018-03-09 23:39:44.705602757 +0100
|
|
@@ -1,5 +1,5 @@
|
|
SET(_tst_scripts
|
|
- test10.py
|
|
+ #test10.py
|
|
test11.py
|
|
test12.py
|
|
test13.py
|
|
diff -rupN med-3.3.1_SRC/tools/medimport/CMakeLists.txt med-3.3.1_SRC-new/tools/medimport/CMakeLists.txt
|
|
--- med-3.3.1_SRC/tools/medimport/CMakeLists.txt 2017-10-31 16:32:12.000000000 +0100
|
|
+++ med-3.3.1_SRC-new/tools/medimport/CMakeLists.txt 2018-03-09 23:48:14.453574562 +0100
|
|
@@ -48,12 +48,13 @@ SET(medimport_static_SOURCES
|
|
# Shared version
|
|
IF(MEDFILE_BUILD_SHARED_LIBS)
|
|
ADD_LIBRARY(medimportengine SHARED ${medimport_SOURCES})
|
|
+ SET_TARGET_PROPERTIES(medimportengine PROPERTIES VERSION ${LIBMEDIMPORT_LIBVER} SOVERSION ${LIBMEDIMPORT_SOVER})
|
|
IF(WIN32)
|
|
MED_SET_DEFINITIONS(medimportengine medimport_EXPORTS MEDIMPORTCXX_DLL_EXPORTS)
|
|
ENDIF()
|
|
TARGET_LINK_LIBRARIES(medimportengine medC)
|
|
SET_TARGET_PROPERTIES(medimportengine PROPERTIES OUTPUT_NAME medimport)
|
|
- INSTALL(TARGETS medimportengine DESTINATION lib)
|
|
+ INSTALL(TARGETS medimportengine DESTINATION lib${LIB_SUFFIX})
|
|
SET(_lib_to_link "medimportengine")
|
|
ENDIF()
|
|
|
|
@@ -63,7 +64,7 @@ IF(MEDFILE_BUILD_STATIC_LIBS)
|
|
TARGET_LINK_LIBRARIES(medimportengine_static medC_static)
|
|
MED_SET_DEFINITIONS(medimportengine_static MED3_USESTATIC)
|
|
SET_TARGET_PROPERTIES(medimportengine_static PROPERTIES OUTPUT_NAME medimport)
|
|
- INSTALL(TARGETS medimportengine_static DESTINATION lib)
|
|
+ INSTALL(TARGETS medimportengine_static DESTINATION lib${LIB_SUFFIX})
|
|
# Give precendence to the shared object for the linking of
|
|
# the executable medimport:
|
|
IF(NOT _lib_to_link)
|
|
@@ -84,4 +85,4 @@ IF(NOT (WIN32 AND MEDFILE_BUILD_STATIC_L
|
|
INSTALL(TARGETS medimport DESTINATION bin )
|
|
ENDIF()
|
|
|
|
-INSTALL(FILES include/medimport_win_dll.h include/MEDimport.h include/MEDimport.hxx include/medimportcxx_win_dll.h DESTINATION include)
|
|
+INSTALL(FILES include/medimport_win_dll.h include/MEDimport.h include/MEDimport.hxx include/medimportcxx_win_dll.h DESTINATION ${INSTALL_INCLUDE_DIR})
|