1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 70ec895..e616b63 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -178,7 +178,9 @@ set_property(TARGET ${PROJECT_NAME} PROPERTY SOVERSION "0")
## Open Image Denoise examples
## ----------------------------------------------------------------------------
-add_subdirectory(examples)
+if(WITH_EXAMPLE)
+ add_subdirectory(examples)
+endif()
## ----------------------------------------------------------------------------
## Open Image Denoise install and packaging
Submodule mkl-dnn contains modified content
diff --git a/mkl-dnn/cmake/TBB.cmake b/mkl-dnn/cmake/TBB.cmake
index 0711e699..c14210b6 100644
--- a/mkl-dnn/cmake/TBB.cmake
+++ b/mkl-dnn/cmake/TBB.cmake
@@ -90,8 +90,8 @@ if(WIN32)
NO_DEFAULT_PATH
)
set(TBB_LIB_DIR ${TBB_ROOT}/lib/${TBB_ARCH}/${TBB_VCVER})
- find_library(TBB_LIBRARY tbb PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
- find_library(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+ find_library(TBB_LIBRARY tbb_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
endif()
else()
@@ -138,13 +138,13 @@ else()
set(TBB_LIBRARY_MALLOC TBB_LIBRARY_MALLOC-NOTFOUND)
if(APPLE)
find_path(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
- find_library(TBB_LIBRARY tbb PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
- find_library(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+ find_library(TBB_LIBRARY tbb_static PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
else()
find_path(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
set(TBB_HINTS HINTS ${TBB_ROOT}/lib/intel64/gcc4.4 ${TBB_ROOT}/lib ${TBB_ROOT}/lib64 PATHS /usr/libx86_64-linux-gnu/)
- find_library(TBB_LIBRARY tbb ${TBB_HINTS})
- find_library(TBB_LIBRARY_MALLOC tbbmalloc ${TBB_HINTS})
+ find_library(TBB_LIBRARY tbb_static ${TBB_HINTS})
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static ${TBB_HINTS})
endif()
endif()
diff '--ignore-matching-lines=:' -ur '--exclude=*.svn*' -u -r
--- a/cmake/install.cmake 2019-08-12 18:02:20.794402575 +0200
+++ b/cmake/install.cmake 2019-08-12 18:06:07.470045703 +0200
@@ -18,6 +18,13 @@
## Install library
## ----------------------------------------------------------------------------
+if(UNIX)
+install(FILES
+ ${CMAKE_BINARY_DIR}/libOpenImageDenoise.a
+ ${CMAKE_BINARY_DIR}/libmkldnn.a
+ ${CMAKE_BINARY_DIR}/libcommon.a
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+else()
install(TARGETS ${PROJECT_NAME}
EXPORT
${PROJECT_NAME}_Export
@@ -38,6 +45,7 @@
DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
)
endif()
+endif()
## ----------------------------------------------------------------------------
## Install headers
@@ -78,6 +86,7 @@
## Install CMake configuration files
## ----------------------------------------------------------------------------
+if(NOT UNIX)
install(EXPORT ${PROJECT_NAME}_Export
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
#NAMESPACE ${PROJECT_NAME}::
@@ -92,3 +101,4 @@
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
COMPONENT devel
)
+endif()
diff '--ignore-matching-lines=:' -ur '--exclude=*.svn*' -u -r
--- a/CMakeLists.txt 2019-08-12 14:22:00.974078598 +0200
+++ b/CMakeLists.txt 2019-08-12 18:05:05.949057375 +0200
@@ -14,7 +14,11 @@
## limitations under the License. ##
## ======================================================================== ##
-cmake_minimum_required(VERSION 3.1)
+if(UNIX)
+ cmake_minimum_required(VERSION 3.1)
+else()
+ cmake_minimum_required(VERSION 3.13)
+endif()
set(OIDN_VERSION_MAJOR 1)
set(OIDN_VERSION_MINOR 0)
@@ -32,13 +36,8 @@
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
# Build as shared or static library
-if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0")
- option(OIDN_STATIC_LIB "Build Open Image Denoise as a static library.")
- mark_as_advanced(CLEAR OIDN_STATIC_LIB)
-else()
- set(OIDN_STATIC_LIB OFF CACHE BOOL "Build Open Image Denoise as a static library." FORCE)
- mark_as_advanced(OIDN_STATIC_LIB)
-endif()
+option(OIDN_STATIC_LIB "Build Open Image Denoise as a static library.")
+mark_as_advanced(CLEAR OIDN_STATIC_LIB)
if(OIDN_STATIC_LIB)
set(OIDN_LIB_TYPE STATIC)
else()
|