1 # ----------------------------------------------------------------------------
2 # CMake file for Intel ITT API. See root CMakeLists.txt
4 # ----------------------------------------------------------------------------
7 set(ITT_LIBRARY "ittnotify")
9 project(${ITT_LIBRARY} C)
12 include(CheckLibraryExists)
13 if(COMMAND CHECK_LIBRARY_EXISTS)
14 CHECK_LIBRARY_EXISTS(dl dlerror "" HAVE_DL_LIBRARY)
18 ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
19 set(ITT_INCLUDE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include")
23 include/jitprofiling.h
24 include/libittnotify.h
25 include/llvm_jit_event_listener.hpp
28 src/ittnotify/disable_warnings.h
29 src/ittnotify/ittnotify_config.h
30 src/ittnotify/ittnotify_static.h
31 src/ittnotify/ittnotify_types.h
34 src/ittnotify/ittnotify_static.c
35 src/ittnotify/jitprofiling.c
38 add_library(${ITT_LIBRARY} STATIC ${ITT_SRCS} ${ITT_PUBLIC_HDRS} ${ITT_PRIVATE_HDRS})
42 target_link_libraries(${ITT_LIBRARY} dl)
46 set_target_properties(${ITT_LIBRARY} PROPERTIES
47 OUTPUT_NAME ${ITT_LIBRARY}
48 DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
49 COMPILE_PDB_NAME ${ITT_LIBRARY}
50 COMPILE_PDB_NAME_DEBUG "${ITT_LIBRARY}${OPENCV_DEBUG_POSTFIX}"
51 ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
54 ocv_warnings_disable(CMAKE_C_FLAGS -Wundef -Wsign-compare)
56 if(ENABLE_SOLUTION_FOLDERS)
57 set_target_properties(${ITT_LIBRARY} PROPERTIES FOLDER "3rdparty")
60 if(NOT BUILD_SHARED_LIBS)
61 ocv_install_target(${ITT_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)