فهرست منبع

Fix Qt5 with debian-based builds (for real)

You have to use qt5_use_modules otherwise it just won't always work.  I
don't know how it was working before with cmake, but apparently this
does the trick to ensure that all the necessary libraries and includes
are added.  ..Might require cmake 3.8.9 though.  ..I do hope that
doesn't end up being a problem.
jp9000 11 سال پیش
والد
کامیت
4444ca55f9
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      obs/CMakeLists.txt

+ 3 - 2
obs/CMakeLists.txt

@@ -1,6 +1,6 @@
 project(obs)
 
-include_directories(SYSTEM Qt5 "${CMAKE_SOURCE_DIR}/libobs")
+include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/libobs")
 
 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
 	set(_lib_suffix 64)
@@ -81,6 +81,8 @@ add_executable(obs WIN32
 	${obs_UI_HEADERS}
 	${obs_QRC_SOURCES})
 
+qt5_use_modules(obs Widgets)
+
 if(WIN32)
 	if(CMAKE_SIZEOF_VOID_P EQUAL 8)
 		set(_output_suffix "64")
@@ -95,7 +97,6 @@ endif()
 
 target_link_libraries(obs
 	libobs
-	Qt5::Widgets
 	${obs_PLATFORM_LIBRARIES})
 
 install_obs_core(obs)