Skip to content

Commit

Permalink
Merge pull request #6598 from lioncash/target
Browse files Browse the repository at this point in the history
DolphinQt2/CMakeLists: Use the target_* equivalents of add_definitions and include_directories
  • Loading branch information
leoetlino committed Apr 5, 2018
2 parents 4cd5ef7 + 9c27c7e commit a3bdb5d
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions Source/Core/DolphinQt2/CMakeLists.txt
Expand Up @@ -3,11 +3,6 @@ find_package(Qt5 REQUIRED COMPONENTS Gui Widgets)
set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES "")
message(STATUS "Found Qt version ${Qt5Core_VERSION}")

include_directories(${CMAKE_CURRENT_BINARY_DIR})

include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})

add_definitions(-DQT_USE_QSTRINGBUILDER -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII)
set(CMAKE_AUTOMOC ON)

add_executable(dolphin-emu-qt2
Expand Down Expand Up @@ -118,6 +113,19 @@ add_executable(dolphin-emu-qt2
Updater.cpp
)

target_compile_definitions(dolphin-emu-qt2
PRIVATE
-DQT_USE_QSTRINGBUILDER
-DQT_NO_CAST_FROM_ASCII
-DQT_NO_CAST_TO_ASCII
)

target_include_directories(dolphin-emu-qt2
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
)

target_link_libraries(dolphin-emu-qt2
PRIVATE
core
Expand Down

0 comments on commit a3bdb5d

Please sign in to comment.