CMakeLists.txt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # ----------------------------------------------------------------------------
  2. # CMake file for IPP IW. See root CMakeLists.txt
  3. #
  4. # ----------------------------------------------------------------------------
  5. project(${IPP_IW_LIBRARY})
  6. ocv_include_directories(${IPP_INCLUDE_DIRS} ${IPP_IW_PATH}/include)
  7. add_definitions(-DIW_BUILD)
  8. if(HAVE_IPP_ICV)
  9. add_definitions(-DICV_BASE)
  10. endif()
  11. file(GLOB lib_srcs ${IPP_IW_PATH}/src/*.c)
  12. file(GLOB lib_hdrs ${IPP_IW_PATH}/include/*.h ${IPP_IW_PATH}/include/iw/*.h ${IPP_IW_PATH}/include/iw++/*.hpp)
  13. # ----------------------------------------------------------------------------------
  14. # Define the library target:
  15. # ----------------------------------------------------------------------------------
  16. add_library(${IPP_IW_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs})
  17. if(UNIX)
  18. if(CV_GCC OR CV_CLANG OR CV_ICC)
  19. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function -Wno-missing-braces -Wno-missing-field-initializers")
  20. endif()
  21. if(CV_CLANG)
  22. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-self-assign -Wno-strict-prototypes")
  23. endif()
  24. endif()
  25. set_target_properties(${IPP_IW_LIBRARY}
  26. PROPERTIES OUTPUT_NAME ${IPP_IW_LIBRARY}
  27. DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
  28. COMPILE_PDB_NAME ${IPP_IW_LIBRARY}
  29. COMPILE_PDB_NAME_DEBUG "${IPP_IW_LIBRARY}${OPENCV_DEBUG_POSTFIX}"
  30. ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
  31. )
  32. if(ENABLE_SOLUTION_FOLDERS)
  33. set_target_properties(${IPP_IW_LIBRARY} PROPERTIES FOLDER "3rdparty")
  34. endif()
  35. if(NOT BUILD_SHARED_LIBS)
  36. ocv_install_target(${IPP_IW_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
  37. endif()