Skip to content

Commit

Permalink
cmake: fix install dir if CMAKE_INSTALL_PREFIX is set
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed May 19, 2017
1 parent 19f9663 commit c724525
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON) # for .moc
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if(NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(QTAV_INSTALL_HEADERS ${CMAKE_INSTALL_PREFIX}/include)
set(QTAV_INSTALL_LIBS ${CMAKE_INSTALL_PREFIX}/lib)
set(QTAV_INSTALL_BINS ${CMAKE_INSTALL_PREFIX}/bin)
Expand Down Expand Up @@ -93,7 +92,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

install(FILES
cmake/FindQtAV.cmake
DESTINATION ${QT_INSTALL_LIBS}/cmake
DESTINATION ${QTAV_INSTALL_LIBS}/cmake
)

if(CMAKE_GENERATOR MATCHES "Visual Studio.*")
Expand Down

0 comments on commit c724525

Please sign in to comment.