CMakeLists.txt 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. cmake_minimum_required(VERSION 2.8)
  2. project (NICELibrary)
  3. include(CheckSymbolExists)
  4. # The version number.
  5. set(NICELibrary_VERSION_MAJOR 1)
  6. set(NICELibrary_VERSION_MINOR 0)
  7. set(CMAKE_VERBOSE_MAKEFILE on)
  8. set(CMAKE_INSTALL_PREFIX ${PROJECT_BINARY_DIR})
  9. set(NICE_BUILD_LIBS_STATIC_SHARED STATIC)
  10. set(NICE_BUILD_PROGS 1)
  11. FIND_PACKAGE(Boost COMPONENTS date_time filesystem)
  12. IF (Boost_FOUND)
  13. message(STATUS "boost-incl-dir: ${Boost_INCLUDE_DIRS}")
  14. INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
  15. ADD_DEFINITIONS( "-DNICE_BOOST_FOUND" )
  16. ENDIF()
  17. #IF(WIN32)
  18. # MESSAGE(FATAL_ERROR "not yet ready")
  19. #ENDIF(WIN32)
  20. # add the binary tree to the search path for include files
  21. #include_directories ("${PROJECT_BINARY_DIR}")
  22. #SET(CMAKE_USE_RELATIVE_PATHS ON)
  23. #check_symbol_exists("__assert_fail" "assert.h" HAVE_ASSERT_FAIL)
  24. include(cmake/OpenCVUtils.cmake REQUIRE)
  25. include(cmake/NiceModules.cmake REQUIRE)
  26. set(OPENCV_LIB_INSTALL_PATH lib)
  27. INCLUDE_DIRECTORIES(".")
  28. INCLUDE_DIRECTORIES(core)
  29. #set(the_module "libnice")
  30. set(the_module "nice")
  31. set(NICE_CURR_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
  32. SUBDIRLIST(__listSubDirs "${NICE_CURR_DIR}")
  33. ocv_glob_modules( ${NICE_CURR_DIR} )
  34. # foreach(_curSubdir ${__listSubDirs})
  35. # ocv_get_real_path(__modpath "${NICE_CURR_DIR}/${_curSubdir}/")
  36. # if(EXISTS "${__modpath}/CMakeLists.txt")
  37. # message(STATUS "add module: ${__modpath}")
  38. set(__modpath "${__modpath}/")
  39. message(STATUS "add module: ${__modpath}")
  40. # ocv_glob_modules( ${__modpath} )
  41. # endif()
  42. # endforeach()
  43. #ADD_SUBDIRECTORY(core bin)
  44. # doxygen support
  45. FIND_PROGRAM(DOXYGEN_EXECUTABLE "doxygen")
  46. #cmake code from: https://github.com/hmeyer/dcmtk/blob/master/CMakeLists.txt
  47. # libxml support
  48. # OPTION(WITH_LIBXML "Build with libxml support." OFF)
  49. # FIND_PATH(WITH_LIBXMLINC "include/libxml/parser.h" "${dcmtk_SOURCE_DIR}/../libxml2-2.6.26")
  50. # # libpng support
  51. # OPTION(WITH_LIBPNG "Build with libpng support." ON)
  52. # FIND_PATH(WITH_LIBPNGINC "include/png.h" "${dcmtk_SOURCE_DIR}/../libpng-1.2.8")
  53. # # libtiff support
  54. # OPTION(WITH_LIBTIFF "Build with libtiff support." ON)
  55. # FIND_PATH(WITH_LIBTIFFINC "include/tiff.h" "${dcmtk_SOURCE_DIR}/../tiff-3.7.4")
  56. # # openssl support
  57. # OPTION(WITH_OPENSSL "Build with openssl support." OFF)
  58. # FIND_PATH(WITH_OPENSSLINC "include/openssl/ssl.h" "${dcmtk_SOURCE_DIR}/../openssl-0.9.8a")
  59. # # zlib support
  60. # OPTION(WITH_ZLIB "Build with zlib support." ON)
  61. # FIND_PATH(WITH_ZLIBINC "include/zlib.h" "${dcmtk_SOURCE_DIR}/../zlib-1.2.3")
  62. # add the install targets
  63. #install (TARGETS ImageLabeler DESTINATION bin)
  64. #install (FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h"
  65. # DESTINATION include)