cmake_minimum_required(VERSION 2.6) if(BUILD_IP) file(GLOB IP_SRC ${IP_DIR}/*.f90 ) set_source_files_properties( ${IP_SRC} PROPERTIES COMPILE_FLAGS ${IP_Fortran_FLAGS} ) file(GLOB IP_F77_SRC ${IP_DIR}/*.F90 ) if( IP_F77_SRC ) set_source_files_properties( ${IP_F77_SRC} PROPERTIES COMPILE_FLAGS ${IP_F77_FLAGS} ) endif() add_library( ${ip} STATIC ${IP_SRC} ${IP_F77_SRC} ) set_target_properties( ${ip} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_INCLUDE_OUTPUT_DIRECTORY} ) endif()