CMake: Add argument to specify console app that uses gui libraries
This commit is contained in:
@@ -606,12 +606,13 @@ function(wx_print_thirdparty_library_summary)
|
||||
endfunction()
|
||||
|
||||
# Add sample, test or demo
|
||||
# wx_add(<name> <group> [CONSOLE|DLL] [IMPORTANT] [SRC_FILES...]
|
||||
# wx_add(<name> <group> [CONSOLE|CONSOLE_GUI|DLL] [IMPORTANT] [SRC_FILES...]
|
||||
# [LIBRARIES ...] [NAME target_name] [FOLDER folder]
|
||||
# [DATA ...] [DEFINITIONS ...] [RES ...])
|
||||
# name default target name
|
||||
# group can be Samples, Tests or Demos
|
||||
# first parameter may be CONSOLE to indicate a console application or DLL to indicate a shared library
|
||||
# or CONSOLE_GUI to indicate a console application that uses gui libraries
|
||||
# all following parameters are src files for the executable
|
||||
#
|
||||
# Optionally:
|
||||
@@ -641,7 +642,7 @@ endfunction()
|
||||
|
||||
function(wx_add name group)
|
||||
cmake_parse_arguments(APP
|
||||
"CONSOLE;DLL;IMPORTANT"
|
||||
"CONSOLE;CONSOLE_GUI;DLL;IMPORTANT"
|
||||
"NAME;FOLDER"
|
||||
"DATA;DEFINITIONS;DEPENDS;LIBRARIES;RES"
|
||||
${ARGN}
|
||||
@@ -709,7 +710,7 @@ function(wx_add name group)
|
||||
if(APP_DLL)
|
||||
add_library(${target_name} SHARED ${src_files})
|
||||
else()
|
||||
if(APP_CONSOLE OR group STREQUAL Tests)
|
||||
if(APP_CONSOLE OR APP_CONSOLE_GUI)
|
||||
set(exe_type)
|
||||
else()
|
||||
set(exe_type WIN32 MACOSX_BUNDLE)
|
||||
|
@@ -37,7 +37,7 @@ set(TEST_DRAWING_DATA
|
||||
drawing/references/image_test_image_gdiplus-6.1_2_ref.png
|
||||
)
|
||||
|
||||
wx_add_test(test_drawing ${TEST_DRAWING_SRC}
|
||||
wx_add_test(test_drawing CONSOLE_GUI ${TEST_DRAWING_SRC}
|
||||
DATA ${TEST_DRAWING_DATA}
|
||||
)
|
||||
if(wxUSE_SOCKETS)
|
||||
|
@@ -181,7 +181,7 @@ set(TEST_GUI_DATA
|
||||
intl/ja/internat.po
|
||||
)
|
||||
|
||||
wx_add_test(test_gui ${TEST_GUI_SRC}
|
||||
wx_add_test(test_gui CONSOLE_GUI ${TEST_GUI_SRC}
|
||||
DATA ${TEST_GUI_DATA}
|
||||
)
|
||||
if(wxUSE_AUI)
|
||||
|
@@ -17,7 +17,7 @@ set(TEST_SRC
|
||||
allheaders.h
|
||||
)
|
||||
|
||||
wx_add_test(test_headers ${TEST_SRC})
|
||||
wx_add_test(test_headers CONSOLE_GUI ${TEST_SRC})
|
||||
if(wxUSE_SOCKETS)
|
||||
wx_exe_link_libraries(test_headers wxnet)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user