Commit 397e235f authored by Andrew J. Burns (Cont's avatar Andrew J. Burns (Cont

changes to fix windows build

parent ff194c1f
......@@ -45,6 +45,7 @@ if (XDMF_STATIC_AND_SHARED)
endif ()
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/CMake/VersionSuite)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
list(APPEND CMAKE_MODULE_PATH
......@@ -366,15 +367,31 @@ if(NOT XDMF_BUILD_CORE_ONLY)
OUTPUT_NAME "Xdmf")
endif (BUILD_SHARED_LIBS)
else()
add_library(${XDMF_LIBNAME} ${LIBTYPE} ${XdmfSources})
if (WIN32)
if (XDMF_BUILD_DSM)
add_library(${XDMF_LIBNAME} ${LIBTYPE} ${XdmfSources} ${XdmfCoreSources} ${XdmfDSMSources})
else ()
add_library(${XDMF_LIBNAME} ${LIBTYPE} ${XdmfSources} ${XdmfCoreSources})
endif ()
else ()
add_library(${XDMF_LIBNAME} ${LIBTYPE} ${XdmfSources})
endif ()
endif()
if(XDMF_BUILD_DSM)
target_link_libraries(${XDMF_LIBNAME} XdmfCore XdmfDSM)
if (NOT WIN32)
target_link_libraries(${XDMF_LIBNAME} XdmfCore XdmfDSM)
else ()
target_link_libraries(${XDMF_LIBNAME} ${XdmfLibraries} ${XdmfDSMLinkLibraries})
endif ()
if(XDMF_STATIC_AND_SHARED AND BUILD_SHARED_LIBS)
target_link_libraries(Xdmf_Static XdmfCore_Static XdmfDSM_Static)
endif()
else(XDMF_BUILD_DSM)
target_link_libraries(${XDMF_LIBNAME} XdmfCore)
if (NOT WIN32)
target_link_libraries(${XDMF_LIBNAME} XdmfCore)
else ()
target_link_libraries(${XDMF_LIBNAME} ${XdmfLibraries})
endif ()
if(XDMF_STATIC_AND_SHARED AND BUILD_SHARED_LIBS)
target_link_libraries(Xdmf_Static XdmfCore_Static)
endif ()
......
......@@ -142,22 +142,28 @@
# define XDMF_TEMPLATE
#else
/* Used to export/import from the dlls */
# undef XDMFCORE_EXPORT
# define XDMFCORE_EXPORT __declspec(dllimport)
# undef XDMFCORE_TEMPLATE
# define XDMFCORE_TEMPLATE extern
# undef XDMFDSM_EXPORT
# define XDMFDSM_EXPORT __declspec(dllimport)
# undef XDMFDSM_TEMPLATE
# define XDMFDSM_TEMPLATE extern
# ifdef XDMF_EXPORTS
# define XDMF_EXPORT __declspec(dllexport)
# define XDMF_TEMPLATE
# define XDMF_EXPORT __declspec(dllexport)
# define XDMF_TEMPLATE
# undef XDMFCORE_EXPORT
# define XDMFCORE_EXPORT __declspec(dllexport)
# undef XDMFCORE_TEMPLATE
# define XDMFCORE_TEMPLATE
# undef XDMFDSM_EXPORT
# define XDMFDSM_EXPORT __declspec(dllexport)
# undef XDMFDSM_TEMPLATE
# define XDMFDSM_TEMPLATE
# else /* XDMF_EXPORTS */
# define XDMF_EXPORT __declspec(dllimport)
# define XDMF_TEMPLATE extern
# define XDMF_EXPORT __declspec(dllimport)
# define XDMF_TEMPLATE extern
# undef XDMFCORE_EXPORT
# define XDMFCORE_EXPORT __declspec(dllimport)
# undef XDMFCORE_TEMPLATE
# define XDMFCORE_TEMPLATE extern
# undef XDMFDSM_EXPORT
# define XDMFDSM_EXPORT __declspec(dllimport)
# undef XDMFDSM_TEMPLATE
# define XDMFDSM_TEMPLATE extern
# endif /* XDMF_EXPORTS */
#endif
......
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