# Set the directory where the source files are located set(src_path src) 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}/src/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}/src/config.h) set(configFile "${CMAKE_CURRENT_SOURCE_DIR}/src/config.h") endif(UNIX) # Gather source files file(GLOB source ${src_path}/*.c) # Define the library add_library(morphology_plugins_c ${source}) if (UNIX) target_compile_options(morphology_plugins_c PRIVATE ${c_compiler_flags}) endif(UNIX) # Define how the files should be structured within Visual Studion source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${source}) set_target_properties (morphology_plugins_c PROPERTIES FOLDER utils_gpl/morphology)