[DO-981] qt package (!15)

Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/15
This commit is contained in:
Aleksandr Vodyanov
2025-02-13 12:25:48 +03:00
parent 60445ac09e
commit 3759e1163f
228 changed files with 16106 additions and 12 deletions

View File

@@ -0,0 +1,31 @@
cmake_minimum_required(VERSION 3.10)
project(test_package)
find_package(opengl_system REQUIRED CONFIG)
set(SOURCES test_package.cpp)
if(WIN32)
list(APPEND SOURCES win.cpp)
endif()
if(APPLE)
list(APPEND SOURCES osx.mm)
set_source_files_properties(osx.mm PROPERTIES COMPILE_FLAGS "-x objective-c++")
list(APPEND PLATFORM_LIBS "objc")
find_library(APPKIT_LIBRARY AppKit)
find_library(FOUNDATION_LIBRARY Foundation)
if(APPKIT_LIBRARY)
list(APPEND PLATFORM_LIBS ${APPKIT_LIBRARY})
endif()
if(FOUNDATION_LIBRARY)
list(APPEND PLATFORM_LIBS ${FOUNDATION_LIBRARY})
endif()
endif()
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME} PRIVATE opengl::opengl ${PLATFORM_LIBS})