Commit 48abd2f4 authored by Brian Panneton's avatar Brian Panneton
Browse files

FIX: Removed some XdmfConfig.cmake variables set before Carries update.

parent dedf4c9f
......@@ -39,7 +39,6 @@ if(XDMF_WRAP_PYTHON OR XDMF_WRAP_JAVA)
if(${SWIG_VERSION} LESS 2.0.0)
message(SEND_ERROR "Swig must be version 2.0.0 or greater")
endif(${SWIG_VERSION} LESS 2.0.0)
set(XDMF_SWIG_EXECUTABLE ${SWIG_EXECUTABLE})
endif(XDMF_WRAP_PYTHON OR XDMF_WRAP_JAVA)
# If we are wrapping python, let's include it in the top level
......@@ -47,9 +46,6 @@ if(XDMF_WRAP_PYTHON)
find_package(PythonInterp REQUIRED)
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
set(XDMF_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
set(XDMF_PYTHON_LIBRARIES ${PYTHON_LIBRARIES})
set(XDMF_PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS})
# A macro to swig and create the python files
# Since we essentually do the same thing inside and outside core, it
......@@ -76,18 +72,24 @@ if(XDMF_WRAP_PYTHON)
if(WIN32)
set_target_properties(${SWIG_MODULE_${python_name}_REAL_NAME}
PROPERTIES
PREFIX ../
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
PROPERTIES
PREFIX ../
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
)
endif(WIN32)
string(TOUPPER ${python_name} python_name_upper)
set(${python_name_upper}_PYTHON_CONFIG
set(${python_name_upper}_PYTHON
${CMAKE_INSTALL_PREFIX}/lib/python/${python_name}.py)
install(FILES ${CMAKE_BINARY_DIR}/${python_name}.py
get_directory_property(${python_name}Parent PARENT_DIRECTORY)
if(NOT "${${python_name}Parent}" STREQUAL "")
set(${python_name_upper}_PYTHON ${${python_name_upper}_PYTHON}
PARENT_SCOPE)
endif(NOT "${${python_name}Parent}" STREQUAL "")
install(FILES ${CMAKE_BINARY_DIR}/${python_name}.py
DESTINATION lib/python)
install(TARGETS ${SWIG_MODULE_${python_name}_REAL_NAME}
DESTINATION lib/python)
......@@ -100,12 +102,6 @@ if(XDMF_WRAP_JAVA)
find_package(JNI REQUIRED)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
set(XDMF_JAVA_INCLUDE_PATH ${JAVA_INCLUDE_PATH})
set(XDMF_JAVA_INCLUDE_PATH2 ${JAVA_INCLUDE_PATH2})
set(XDMF_JAVA_RUNTIME ${JAVA_RUNTIME})
set(XDMF_JAVA_COMPILE ${JAVA_COMPILE})
set(XDMF_JAVA_ARCHIVE ${JAVA_ARCHIVE})
# A macro to swig and create the jar files
# Since we essentually do the same thing inside and outside core, it
# would be easier as a macro
......@@ -169,8 +165,14 @@ if(XDMF_WRAP_JAVA)
)
string(TOUPPER ${java_name} java_name_upper)
set(${java_name_upper}_JAVA_JAR_CONFIG
${CMAKE_INSTALL_PREFIX}/lib/java/${java_name}.jar)
set(${java_name_upper}_JAVA_JAR
${CMAKE_INSTALL_PREFIX}/lib/java/${java_name}.jar)
get_directory_property(${java_name}Parent PARENT_DIRECTORY)
if(NOT "${${java_name}Parent}" STREQUAL "")
set(${java_name_upper}_JAVA_JAR ${${java_name_upper}_JAVA_JAR}
PARENT_SCOPE)
endif(NOT "${${java_name}Parent}" STREQUAL "")
install(FILES ${CMAKE_BINARY_DIR}/${java_name}.jar
DESTINATION lib/java)
install(TARGETS ${SWIG_MODULE_${java_name}Java_REAL_NAME}
......@@ -212,11 +214,11 @@ if(NOT XDMF_BUILD_CORE_ONLY)
if(WIN32)
set_target_properties(Xdmf PROPERTIES
DEFINE_SYMBOL Xdmf_EXPORTS
PREFIX ../
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
DEFINE_SYMBOL Xdmf_EXPORTS
PREFIX ../
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
endif(WIN32)
if(XDMF_WRAP_JAVA)
......@@ -237,9 +239,9 @@ if(NOT XDMF_BUILD_CORE_ONLY)
endif(XDMF_BUILD_UTILS)
if(WIN32)
set(XDMF_LIBRARY_CONFIG ${CMAKE_INSTALL_PREFIX}/lib/Xdmf.lib)
set(XDMF_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/Xdmf.lib)
else(WIN32)
set(XDMF_LIBRARY_CONFIG ${CMAKE_INSTALL_PREFIX}/lib/libXdmf.so)
set(XDMF_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/libXdmf.so)
endif(WIN32)
file(GLOB XdmfHeaders "*.hpp" "*.tpp" "*.i" "CMake/VersionSuite/*.hpp")
......
......@@ -2,14 +2,11 @@ function(xdmf_create_config_file name)
get_cmake_property(ALL_VARS VARIABLES)
set(XDMF_VARS "")
foreach(var ${ALL_VARS})
if (var MATCHES "^(XDMF).*$")
if ("${${var}}" MATCHES ".+")
if ("${${var}}" MATCHES ".+")
string(REGEX REPLACE "\\\\" "\\\\\\\\" ${var} "${${var}}")
if (var MATCHES "^(XDMF).*$")
set(XDMF_VARS "${XDMF_VARS}\nset(${var}\t\t${${var}})")
endif()
else()
#message("set(${var} ${${var}}")
#list(APPEND XDMF_VARS ${var})
if ("${${var}}" MATCHES ".+")
else()
set(XDMF_VARS "${XDMF_VARS}\nset(XDMF_${var}\t\t${${var}})")
endif()
endif()
......
......@@ -18,9 +18,6 @@ option(XDMF_BUILD_DSM OFF)
find_package(Boost REQUIRED)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
set(XDMF_BOOST_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
get_filename_component(Boost_ROOT "${Boost_INCLUDE_DIRS}" REALPATH)
set(XDMF_BOOST_ROOT_DIR ${Boost_ROOT})
endif(Boost_FOUND)
find_package(HDF5 REQUIRED)
......@@ -34,11 +31,8 @@ if(HDF5_FOUND)
endif(HDF5_IS_PARALLEL)
get_filename_component(HDF5_ROOT "${HDF5_INCLUDE_DIR}/../" REALPATH)
set(HDF5_BINARY_DIRS ${HDF5_ROOT}/bin ${HDF5_ROOT}/dll)
set(XDMF_HDF5_ROOT_DIR ${HDF5_ROOT})
set(XDMF_HDF5_INCLUDE_DIR ${HDF5_INCLUDE_DIR})
set(XDMF_HDF5_LIBRARIES ${HDF5_LIBRARIES})
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${HDF5_LIBRARIES})
set(XDMF_HDF5_BINARY_DIRS ${HDF5_BINARY_DIRS})
set(XDMF_HDF5_BINARY_DIRS ${HDF5_BINARY_DIRS} PARENT_SCOPE)
set(XDMF_BINARIES ${XDMF_BINARIES} ${HDF5_BINARY_DIRS})
endif(HDF5_FOUND)
......@@ -61,12 +55,8 @@ find_package(LibXml2 REQUIRED)
if(LIBXML2_FOUND)
include_directories(${LIBXML2_INCLUDE_DIR})
get_filename_component(LIBXML2_ROOT "${LIBXML2_INCLUDE_DIR}/../" REALPATH)
set(LIBXML2_BINARY_DIRS ${LIBXML2_ROOT}/bin)
set(XDMF_LIBXML2_ROOT_DIR ${LIBXML2_ROOT})
set(XDMF_LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIR})
set(XDMF_LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES})
set(LIBXML2_BINARY_DIRS ${LIBXML2_ROOT}/bin PARENT_SCOPE)
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${LIBXML2_LIBRARIES})
set(XDMF_LIBXML2_BINARY_DIRS ${LIBXML2_BINARY_DIRS})
set(XDMF_BINARIES ${XDMF_BINARIES} ${LIBXML2_BINARY_DIRS})
endif(LIBXML2_FOUND)
......@@ -101,11 +91,11 @@ target_link_libraries(XdmfCore ${HDF5_LIBRARIES} ${HDF5DSM_LIBRARIES} ${LIBXML2_
if(WIN32)
add_definitions(-D_HDF5USEDLL_ -D_HDF5USEHLDLL_)
set_target_properties(XdmfCore PROPERTIES
DEFINE_SYMBOL XdmfCore_EXPORTS
PREFIX ../
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
DEFINE_SYMBOL XdmfCore_EXPORTS
PREFIX ../
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
endif(WIN32)
if(XDMF_WRAP_JAVA)
......@@ -117,9 +107,10 @@ if(XDMF_WRAP_PYTHON)
endif(XDMF_WRAP_PYTHON)
if(WIN32)
set(XDMFCORE_LIBRARY_CONFIG ${CMAKE_INSTALL_PREFIX}/lib/XdmfCore.lib)
set(XDMFCORE_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/XdmfCore.lib PARENT_SCOPE)
else(WIN32)
set(XDMFCORE_LIBRARY_CONFIG ${CMAKE_INSTALL_PREFIX}/lib/libXdmfCore.so)
set(XDMFCORE_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/libXdmfCore.so
PARENT_SCOPE)
endif(WIN32)
file(GLOB_RECURSE XdmfCoreHeaders "*.hpp" "*.tpp" "*.i" "../CMake/VersionSuite/*.hpp")
......@@ -138,10 +129,6 @@ if(BUILD_TESTING)
add_subdirectory(tests)
endif(BUILD_TESTING)
# Since these are not set as of yet, we don't want to remove them from the
# config file
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${CMAKE_INSTALL_PREFIX}/lib)
set(XDMF_BINARIES ${XDMF_BINARIES} ${CMAKE_INSTALL_PREFIX}/bin)
set(XDMF_LIBRARY_CONFIG "@XDMF_LIBRARY_CONFIG@")
set(XDMF_JAVA_JAR_CONFIG "@XDMF_JAVA_JAR_CONFIG@")
set(XDMF_PYTHON_CONFIG "@XDMF_PYTHON_CONFIG@")
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${CMAKE_INSTALL_PREFIX}/lib PARENT_SCOPE)
set(XDMF_BINARIES ${XDMF_BINARIES} ${CMAKE_INSTALL_PREFIX}/bin PARENT_SCOPE)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment