# Include directories that are required as header references set(deltares_common_c_include_path ${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories(${deltares_common_c_include_path} ${pthreads_path}) # Set include path to have it accessible for other components set(public_include_path ${deltares_common_c_include_path}) if (UNIX) #name mangling, these functions are generated by the FortranCInterface cmake package and might be system dependent include(FortranCInterface) FortranCInterface_HEADER("${CMAKE_CURRENT_SOURCE_DIR}/include/FortranCInterface.h" MACRO_NAMESPACE "FC_") #produce a config.h to be included configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake.in ${CMAKE_CURRENT_SOURCE_DIR}/include/config.h) set(configFile "${CMAKE_CURRENT_SOURCE_DIR}/include/config.h") add_definitions(-DHAVE_FSEEKO64) endif(UNIX) set(headers include/so_fortran_api.h ${configFile} ) set(source src/dfm_lib_fortran_api.c ) set(library_name dfm_api_access) add_library(${library_name} ${source} ${headers}) # Create the folder structure in vfproj source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${source} ${headers}) set_target_properties (${library_name} PROPERTIES FOLDER tools_gpl/dfm_volume_tool) #Set preprocessor definitions target_compile_definitions(${library_name} PRIVATE _LIB;_CRT_SECURE_NO_DEPRECATE)