| 1 |
INCLUDE(FortranSettings) |
| 2 |
|
| 3 |
if (SEACASExodus_ENABLE_STATIC) |
| 4 |
INCLUDE(InstallSymLink) |
| 5 |
endif() |
| 6 |
|
| 7 |
TRIBITS_SUBPACKAGE(Exodus_for) |
| 8 |
|
| 9 |
TRIBITS_INCLUDE_DIRECTORIES( |
| 10 |
"${CMAKE_CURRENT_SOURCE_DIR}/include" |
| 11 |
"${CMAKE_CURRENT_SOURCE_DIR}/test" |
| 12 |
) |
| 13 |
|
| 14 |
SET(SOURCES "") |
| 15 |
TRIBITS_SET_AND_INC_DIRS(DIR ${CMAKE_CURRENT_SOURCE_DIR}) |
| 16 |
|
| 17 |
APPEND_GLOB(SOURCES ${DIR}/src/*.c ${DIR}/src/*.F) |
| 18 |
LIST(REMOVE_ITEM SOURCES "${DIR}/src/exo_jack-windows.c") |
| 19 |
|
| 20 |
SET(HEADERS include/exodusII.inc ) |
| 21 |
|
| 22 |
TRIBITS_ADD_LIBRARY( |
| 23 |
exodus_for |
| 24 |
HEADERS ${HEADERS} |
| 25 |
SOURCES ${SOURCES} |
| 26 |
) |
| 27 |
|
| 28 |
# Many users of the SEACAS installations still want a static exodus library... |
| 29 |
if (SEACASExodus_ENABLE_STATIC) |
| 30 |
ADD_LIBRARY( |
| 31 |
exodus_for_static |
| 32 |
STATIC |
| 33 |
${SOURCES} |
| 34 |
) |
| 35 |
target_link_libraries(exodus_for_static PUBLIC Netcdf::all_libs) |
| 36 |
target_link_libraries(exodus_for_static PRIVATE SEACASExodus::all_libs) |
| 37 |
set_target_properties(exodus_for_static PROPERTIES OUTPUT_NAME exodus_for) |
| 38 |
# This keeps the library out of the `all_libs` targets... |
| 39 |
set_target_properties(exodus_for_static PROPERTIES TRIBITS_TESTONLY_LIB TRUE) |
| 40 |
INSTALL(TARGETS exodus_for_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
| 41 |
|
| 42 |
# For backwards compatibility, the Fortran exodus library was called libexoIIv2for.a |
| 43 |
# Create a symbolic link from libexodus_for.a to libexoIIv2for.a -- do only for static lib |
| 44 |
InstallSymLink(libexodus_for.a ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libexoIIv2for.a) |
| 45 |
endif() |
| 46 |
|
| 47 |
TRIBITS_ADD_TEST_DIRECTORIES(test) |
| 48 |
|
| 49 |
TRIBITS_SUBPACKAGE_POSTPROCESS() |