Skip to content

Commit

Permalink
Remove hardcoded paths to moc.exe, rcc.exe, uic.exe from CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
datadiode committed Oct 26, 2023
1 parent 3f3c767 commit f1d713a
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
project(Endorphin)
cmake_minimum_required(VERSION 3.12)

set(QT_MOC_EXECUTABLE "C:/qt/5.5/msvc2013/bin/moc.exe")
add_executable(Qt5::moc IMPORTED)
set_target_properties(Qt5::moc PROPERTIES IMPORTED_LOCATION ${QT_MOC_EXECUTABLE})
if(DEFINED QT_MOC_EXECUTABLE)
add_executable(Qt5::moc IMPORTED)
set_target_properties(Qt5::moc PROPERTIES IMPORTED_LOCATION ${QT_MOC_EXECUTABLE})
endif()
set(CMAKE_AUTOMOC ON)

set(QT_RCC_EXECUTABLE "C:/qt/5.5/msvc2013/bin/rcc.exe")
add_executable(Qt5::rcc IMPORTED)
set_target_properties(Qt5::rcc PROPERTIES IMPORTED_LOCATION ${QT_RCC_EXECUTABLE})
if(DEFINED QT_RCC_EXECUTABLE)
add_executable(Qt5::rcc IMPORTED)
set_target_properties(Qt5::rcc PROPERTIES IMPORTED_LOCATION ${QT_RCC_EXECUTABLE})
endif()
set(CMAKE_AUTORCC ON)

set(QT_UIC_EXECUTABLE "C:/qt/5.5/msvc2013/bin/uic.exe")
add_executable(Qt5::uic IMPORTED)
set_target_properties(Qt5::uic PROPERTIES IMPORTED_LOCATION ${QT_UIC_EXECUTABLE})
if(DEFINED QT_UIC_EXECUTABLE)
add_executable(Qt5::uic IMPORTED)
set_target_properties(Qt5::uic PROPERTIES IMPORTED_LOCATION ${QT_UIC_EXECUTABLE})
endif()
set(CMAKE_AUTOUIC ON)

set(CMAKE_BUILD_TYPE Release)
Expand Down

0 comments on commit f1d713a

Please sign in to comment.