# Gather the source files set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/../src-f90") file(GLOB source ${source_path}/kdtree2.f90) set(library_name kdtree2) add_library(${library_name} ${source}) if (WIN32) # Set additional compilation properties target_compile_options(${library_name} PRIVATE "${check_bounds_flag}") endif(WIN32) if (UNIX) target_link_libraries(${library_name} ${dependecies}) endif(UNIX) # Create the folder structure in vfproj source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}/.." FILES ${source}) set_target_properties (${library_name} PROPERTIES FOLDER third_party_open)