File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -132,27 +132,29 @@ endif()
132
132
133
133
if (NOT INSTALL_CREATE_DISTRIB AND DEFINED ${PYTHON} _PACKAGES_PATH )
134
134
set (__dst "${${PYTHON} _PACKAGES_PATH}" )
135
- install (TARGETS ${the_module} OPTIONAL
136
- ${PYTHON_INSTALL_CONFIGURATIONS}
137
- RUNTIME DESTINATION "${__dst} " COMPONENT python
138
- LIBRARY DESTINATION "${__dst} " COMPONENT python
139
- ${PYTHON_INSTALL_ARCHIVE}
140
- )
141
- else ()
135
+ endif ()
136
+ if (NOT __dst )
142
137
if (DEFINED ${PYTHON} _VERSION_MAJOR )
143
138
set (__ver "${${PYTHON} _VERSION_MAJOR}.${${PYTHON} _VERSION_MINOR}" )
144
139
elseif (DEFINED ${PYTHON} _VERSION_STRING )
145
140
set (__ver "${${PYTHON} _VERSION_STRING}" )
146
141
else ()
147
142
set (__ver "unknown" )
148
143
endif ()
149
- install ( TARGETS ${the_module}
150
- CONFIGURATIONS Release
151
- RUNTIME DESTINATION python/${__ver}/${OpenCV_ARCH} COMPONENT python
152
- LIBRARY DESTINATION python/${__ver}/${OpenCV_ARCH} COMPONENT python
153
- )
144
+ if ( INSTALL_CREATE_DISTRIB )
145
+ set ( __dst "python/ ${__ver} / ${OpenCV_ARCH} " )
146
+ else ()
147
+ set ( __dst " python/${__ver} " )
148
+ endif ( )
154
149
endif ()
155
150
151
+ install (TARGETS ${the_module}
152
+ ${PYTHON_INSTALL_CONFIGURATIONS}
153
+ RUNTIME DESTINATION "${__dst} " COMPONENT python
154
+ LIBRARY DESTINATION "${__dst} " COMPONENT python
155
+ ${PYTHON_INSTALL_ARCHIVE}
156
+ )
157
+
156
158
unset (PYTHON_SRC_DIR )
157
159
unset (PYTHON_CVPY_PROCESS )
158
160
unset (CVPY_SUFFIX )
You can’t perform that action at this time.
0 commit comments