Fix up minimal dependency case and clang support.
This commit is contained in:
parent
925f0c3ccd
commit
1adc9272f8
17 changed files with 183 additions and 226 deletions
|
@ -1,3 +1,7 @@
|
|||
set(APP_NAME sample_gui)
|
||||
|
||||
message(STATUS "Checking dependencies for app: " ${APP_NAME})
|
||||
|
||||
list(APPEND client_HEADERS
|
||||
MediaTool.h
|
||||
text_editor/TextEditorView.h
|
||||
|
@ -31,18 +35,22 @@ list(APPEND client_LIB_INCLUDES
|
|||
web_client/WebClientView.cpp
|
||||
MediaTool.cpp)
|
||||
|
||||
set(DEPENDENCIES_FOUND True)
|
||||
if(WIN32)
|
||||
add_executable(sample_gui WIN32 gui-main-win.cpp ${client_LIB_INCLUDES})
|
||||
add_executable(${APP_NAME} WIN32 gui-main-win.cpp ${client_LIB_INCLUDES})
|
||||
else()
|
||||
find_package(X11 QUIET)
|
||||
if(X11_FOUND)
|
||||
add_executable(sample_gui gui-main.cpp ${client_LIB_INCLUDES} ${client_HEADERS})
|
||||
add_executable(${APP_NAME} gui-main.cpp ${client_LIB_INCLUDES} ${client_HEADERS})
|
||||
else()
|
||||
message(STATUS "Skipping sample GUI as no X11 dev support")
|
||||
message(STATUS "X11 not found - skipping")
|
||||
set(DEPENDENCIES_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_include_directories(sample_gui PUBLIC
|
||||
|
||||
if(DEPENDENCIES_FOUND)
|
||||
target_include_directories(${APP_NAME} PUBLIC
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/text_editor"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/audio_editor"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/image_editor"
|
||||
|
@ -50,7 +58,7 @@ target_include_directories(sample_gui PUBLIC
|
|||
"${CMAKE_CURRENT_SOURCE_DIR}/canvas"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/mesh_viewer"
|
||||
)
|
||||
target_link_libraries(sample_gui PUBLIC client windows console core network database geometry audio web)
|
||||
set_property(TARGET sample_gui PROPERTY FOLDER apps)
|
||||
|
||||
target_link_libraries(${APP_NAME} PUBLIC client windows console core network database geometry audio web)
|
||||
set_property(TARGET ${APP_NAME} PROPERTY FOLDER apps)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue