Skip to content

Commit

Permalink
Merge pull request wang-bin#1371 from cathaysia/patch-1
Browse files Browse the repository at this point in the history
根据 CMAKE_BUILD_TYPE 查找库
  • Loading branch information
wang-bin authored Apr 14, 2021
2 parents da247aa 01b9c54 commit 305e540
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions cmake/FindQtAV.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 24,25 @@ find_path(QTAV_INCLUDE_DIR NAMES QtAV.h
HINTS ${QT_INSTALL_HEADERS}
PATH_SUFFIXES QtAV
)
find_library(QTAV_LIBRARY NAMES QtAV QtAV1
HINTS ${QT_INSTALL_LIBS}
)

find_path(QTAVWIDGETS_INCLUDE_DIR NAMES QtAVWidgets.h
HINTS ${QT_INSTALL_HEADERS}
PATH_SUFFIXES QtAVWidgets
)
find_library(QTAVWIDGETS_LIBRARY NAMES QtAVWidgets QtAVWidgets1
HINTS ${QT_INSTALL_LIBS}
)
if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
find_library(QTAV_LIBRARY NAMES QtAVd QtAVd1
HINTS ${QT_INSTALL_LIBS}
)
find_library(QTAVWIDGETS_LIBRARY NAMES QtAVWidgetsd QtAVWidgetsd1
HINTS ${QT_INSTALL_LIBS}
)
else()
find_library(QTAV_LIBRARY NAMES QtAV QtAV1
HINTS ${QT_INSTALL_LIBS}
)
find_library(QTAVWIDGETS_LIBRARY NAMES QtAVWidgets QtAVWidgets1
HINTS ${QT_INSTALL_LIBS}
)
endif()

set(QTAV_INCLUDE_DIRS ${QTAV_INCLUDE_DIR} ${QTAV_INCLUDE_DIR}/..)
set(QTAV_LIBRARIES ${QTAV_LIBRARY})
Expand Down

0 comments on commit 305e540

Please sign in to comment.