set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -O3") set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) macro(add_example name switch) if(${switch}) # 添加可执行程序名称 add_executable(${name} ${name}.cpp) # 设置安装后的动态库调用地址 set_target_properties(${name} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib) target_link_libraries(${name} PUBLIC ${GCTL_LIB}) target_link_libraries(${name} PUBLIC gctl_seismic) endif() endmacro() add_example(check_utc_time ON) add_example(check_sig ON) add_example(check_sac ON) add_example(check_xc ON)