1# Copyright (c) Facebook, Inc. 2# Licensed under the Apache License, Version 2.0 (the "License") 3 4include_directories(${CMAKE_SOURCE_DIR}/src/cc) 5include_directories(${CMAKE_SOURCE_DIR}/src/cc/api) 6include_directories(${CMAKE_SOURCE_DIR}/src/cc/libbpf/include/uapi) 7 8add_executable(PyPerf PyPerf.cc PyPerfUtil.cc PyPerfBPFProgram.cc PyPerfLoggingHelper.cc PyPerfDefaultPrinter.cc Py36Offsets.cc) 9target_link_libraries(PyPerf bcc-static) 10if(NOT CMAKE_USE_LIBBPF_PACKAGE) 11 target_link_libraries(PyPerf bcc-static) 12else() 13 target_link_libraries(PyPerf bcc-shared) 14endif() 15 16if(INSTALL_CPP_EXAMPLES) 17 install (TARGETS PyPerf DESTINATION share/bcc/examples/cpp) 18endif(INSTALL_CPP_EXAMPLES) 19