1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
cmake_minimum_required(VERSION 2.6) PROJECT(maglib CXX Fortran) add_definitions( -DLINUX ) set(CMAKE_BUILD_TYPE Release) set(CMAKE_CXX_FLAGS "-O3 -fPIC -fno-align-commons -fbounds-check -fbacktrace -ffixed-form") file( GLOB source_files src/*.f ) add_library(maglib SHARED ${source_files}) SET_TARGET_PROPERTIES(maglib PROPERTIES LINKER_LANGUAGE CXX) install (TARGETS maglib DESTINATION lib) install (FILES src/include/maglib.hh DESTINATION include)