33 lines
993 B
CMake
33 lines
993 B
CMake
w_use3rd(Qt5)
|
|
|
|
|
|
set(other_library Qt5::Widgets Qt5::Core Qt5::Svg Qt5::Xml Qt5::PrintSupport Qt5::Multimedia Qt5::QuickWidgets)
|
|
find_package(OpenGL)
|
|
if(OpenGL_FOUND)
|
|
list(APPEND other_library OpenGL::GL)
|
|
endif()
|
|
|
|
|
|
|
|
set(dir "${CMAKE_CURRENT_LIST_DIR}/YSGraphic_Core")
|
|
file(GLOB_RECURSE srcs "${dir}/*.c" "${dir}/*.cpp" "${dir}/*.h")
|
|
add_library(YSGraphic_Core STATIC "${srcs}")
|
|
target_include_directories(YSGraphic_Core PUBLIC "${CMAKE_CURRENT_LIST_DIR}")
|
|
|
|
set(Core Core_Static)
|
|
|
|
target_link_libraries(YSGraphic_Core PUBLIC ${other_library})
|
|
set_property(TARGET YSGraphic_Core PROPERTY AUTOMOC ON)
|
|
set_property(TARGET YSGraphic_Core PROPERTY AUTOUIC ON)
|
|
set_property(TARGET YSGraphic_Core PROPERTY AUTORCC ON)
|
|
|
|
target_link_libraries(YSGraphic_Core PUBLIC ${Core})
|
|
|
|
|
|
set(dir "${CMAKE_CURRENT_LIST_DIR}/DemoGallery")
|
|
file(GLOB_RECURSE srcs "${dir}/*.c" "${dir}/*.cpp" "${dir}/*.h" "${dir}/*.hpp")
|
|
add_executable(DemoGallery ${srcs})
|
|
target_link_libraries(DemoGallery PUBLIC YSGraphic_Core)
|
|
|
|
|