source: eviacam/trunk/fuentes/creavision/CMakeLists.txt @ 567

Last change on this file since 567 was 567, checked in by mabarracus, 4 years ago

updated sources to version 2.0.3

  • Property svn:executable set to *
File size: 2.6 KB
Line 
1cmake_minimum_required(VERSION 2.6)
2project(creavision)
3
4set(creavision_SRCS
5        crvcamera.h
6        crvcamera.cpp
7        crvcamera_enum.h
8        crvcamera_enum.cpp     
9        crvcolor.cpp
10        crvcolor.h
11        crvgeomtry.cpp
12        crvgeomtry.h
13        crvhistogram.cpp
14        crvhistogram.h
15        crvimage.cpp
16        crvimage.h
17        crvmisc.cpp
18        crvmisc.h
19        crvnormroi.cpp
20        crvnormroi.h
21        crvskindetection.cpp
22        crvskindetection.h
23)
24
25IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
26FIND_PACKAGE( GLIB2 REQUIRED )
27INCLUDE_DIRECTORIES (${GLIB2_INCLUDE_DIRS})
28INCLUDE_DIRECTORIES (libwebcam)
29add_subdirectory(libwebcam)
30set(creavision_SRCS ${creavision_SRCS}
31        crvcamera_v4l2.cpp
32        crvcamera_v4l2.h
33        colorspaces.cpp
34        colorspaces.h
35        pwc-ioctl.h
36        defs.h
37)
38ELSEIF(WIN32)
39set(creavision_SRCS ${creavision_SRCS}
40        crvcamera_wdm.cpp
41        crvcamera_wdm.h
42        videoInput.cpp
43        videoInput.h
44)
45ELSE(CMAKE_SYSTEM_NAME MATCHES "Linux")
46set(creavision_SRCS ${creavision_SRCS}
47        crvcamera_cv.cpp
48        crvcamera_cv.h
49)
50ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
51
52if(UNIX)
53        # For UNIX platforms we assume OpenCV is under /usr which
54        # would not be always true
55#       set (OpenCV_DIR "/usr")
56endif(UNIX)
57
58FIND_PACKAGE( OpenCV REQUIRED core video highgui imgproc)
59
60if(WIN32)
61        if (MSVC)
62                configure_file("${OpenCV_DIR}/bin/Debug/opencv_core220d.dll" ${RUNTIME_OUTPUT_DIRECTORY}/Debug COPYONLY)
63                configure_file("${OpenCV_DIR}/bin/opencv_core220.dll" ${RUNTIME_OUTPUT_DIRECTORY}/Release COPYONLY)
64               
65                configure_file("${OpenCV_DIR}/bin/Debug/opencv_highgui220d.dll" ${RUNTIME_OUTPUT_DIRECTORY}/Debug COPYONLY)
66                configure_file("${OpenCV_DIR}/bin/opencv_highgui220.dll" ${RUNTIME_OUTPUT_DIRECTORY}/Release COPYONLY)
67               
68                configure_file("${OpenCV_DIR}/bin/Debug/opencv_imgproc220d.dll" ${RUNTIME_OUTPUT_DIRECTORY}/Debug COPYONLY)
69                configure_file("${OpenCV_DIR}/bin/opencv_imgproc220.dll" ${RUNTIME_OUTPUT_DIRECTORY}/Release COPYONLY)
70               
71                configure_file("${OpenCV_DIR}/bin/Debug/opencv_video220d.dll" ${RUNTIME_OUTPUT_DIRECTORY}/Debug COPYONLY)
72                configure_file("${OpenCV_DIR}/bin/opencv_video220.dll" ${RUNTIME_OUTPUT_DIRECTORY}/Release COPYONLY)
73        endif(MSVC)
74
75        install (FILES
76                "${OpenCV_DIR}/bin/opencv_core220.dll"
77                "${OpenCV_DIR}/bin/opencv_highgui220.dll"
78                "${OpenCV_DIR}/bin/opencv_imgproc220.dll"
79                "${OpenCV_DIR}/bin/opencv_video220.dll"
80                DESTINATION ${LIBRUNTIMEDIR}
81        )
82endif(WIN32)
83
84add_library (creavision STATIC ${creavision_SRCS})
85TARGET_LINK_LIBRARIES(creavision ${OpenCV_LIBS} )
86TARGET_LINK_LIBRARIES(creavision simplelog)
87
88IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
89        TARGET_LINK_LIBRARIES(creavision libwebcam v4l2)
90ELSEIF(WIN32)
91        TARGET_LINK_LIBRARIES(creavision ole32.lib strmiids.lib uuid.lib dxguid.lib)
92ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
Note: See TracBrowser for help on using the repository browser.