Files
ResInsight/ThirdParty/Ert/libecl/applications/CMakeLists.txt

82 lines
3.2 KiB
CMake

if (BUILD_APPLICATIONS)
add_executable( sum_write sum_write.c )
add_executable( make_grid make_grid.c )
add_executable( grdecl_grid grdecl_grid.c )
if (ERT_LINUX)
add_executable( ecl_pack.x ecl_pack.c )
add_executable( ecl_unpack.x ecl_unpack.c )
add_executable( esummary.x esummary.c )
add_executable( convert.x convert.c )
add_executable( grdecl_test.x grdecl_test.c )
add_executable( kw_list.x kw_list.c )
add_executable( kw_extract.x kw_extract.c )
add_executable( grid_info.x grid_info.c )
add_executable( grid_dump.x grid_dump.c )
add_executable( grid_dump_ascii.x grid_dump_ascii.c )
add_executable( summary.x view_summary.c )
add_executable( select_test.x select_test.c )
add_executable( load_test.x load_test.c )
set(program_list ecl_pack.x ecl_unpack.x esummary.x kw_extract.x grdecl_grid make_grid sum_write load_test.x grdecl_test.x grid_dump_ascii.x select_test.x grid_dump.x convert.x kw_list.x grid_info.x summary.x)
else()
# The stupid .x extension creates problems on windows
add_executable( ecl_pack ecl_pack.c )
add_executable( ecl_unpack ecl_unpack.c )
add_executable( kw_extract kw_extract.c )
add_executable( grid_info grid_info.c )
add_executable( grid_dump grid_dump.c )
add_executable( grid_dump_ascii grid_dump_ascii.c )
add_executable( summary view_summary.c )
add_executable( select_test select_test.c )
add_executable( load_test load_test.c )
set(program_list ecl_pack ecl_unpack kw_extract grdecl_grid make_grid sum_write load_test grid_dump_ascii select_test grid_dump grid_info summary)
endif()
if (BUILD_ERT)
add_executable( ecl_quantile ecl_quantile.c )
include_directories( ../../libconfig/include )
target_link_libraries( ecl_quantile config )
list( APPEND program_list ecl_quantile )
endif()
foreach(prog ${program_list})
target_link_libraries( ${prog} ecl ert_util )
if (USE_RUNPATH)
add_runpath( ${prog} )
endif()
#-----------------------------------------------------------------
set (destination ${CMAKE_INSTALL_PREFIX}/bin)
if (INSTALL_ERT)
install(TARGETS ${prog} DESTINATION ${destination})
if (INSTALL_GROUP)
install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/${prog})")
install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/${prog})")
endif()
endif()
endforeach()
endif()
if (BUILD_ECL_SUMMARY)
add_executable( ecl_summary view_summary.c )
target_link_libraries( ecl_summary ecl)
if (USE_RUNPATH)
add_runpath( ecl_summary )
endif()
set (destination ${CMAKE_INSTALL_PREFIX}/bin)
if (INSTALL_ERT)
install(TARGETS ecl_summary DESTINATION ${destination})
if (INSTALL_GROUP)
install(CODE "EXECUTE_PROCESS(COMMAND chgrp ${INSTALL_GROUP} ${destination}/ecl_summary)")
install(CODE "EXECUTE_PROCESS(COMMAND chmod g+w ${destination}/ecl_summary)")
endif()
endif()
include(GNUInstallDirs)
install(FILES ${PROJECT_SOURCE_DIR}/docs/man/man1/ecl_summary.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif()