CMakeLists.txt 745 Bytes
Newer Older
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
project(Xdmf2)
cmake_minimum_required(VERSION 2.6)

include_directories(${CMAKE_CURRENT_SOURCE_DIR})

set(BUILD_SHARED_LIBS true)

find_package(Boost REQUIRED)
if(Boost_FOUND)
    include_directories(${Boost_INCLUDE_DIRS})
    message(${Boost_INCLUDE_DIRS})
endif(Boost_FOUND)

find_package(PythonLibs REQUIRED)
if(PYTHONLIBS_FOUND)
  include_directories(${PYTHON_INCLUDE_DIRS})
endif(PYTHONLIBS_FOUND)

set(XdmfSources
  XdmfGeometry
  XdmfGrid
  XdmfObject
  XdmfTopology
)

add_library(Xdmf ${XdmfSources})

add_library(_Xdmf MODULE XdmfPython)
set_target_properties(_Xdmf PROPERTIES PREFIX "")
target_link_libraries(_Xdmf Xdmf)
configure_file(Xdmf.py Xdmf.py COPYONLY)

add_executable(XdmfTest test.cpp)
target_link_libraries(XdmfTest Xdmf)