2016-06-03 18:25:43 -05:00
|
|
|
# 3 june 2016
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
set(_EXAMPLE_RESOURCES_RC resources.rc)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
macro(_add_example _name)
|
|
|
|
_add_exec(${_name} ${ARGN})
|
|
|
|
# because Microsoft's toolchain is dumb
|
|
|
|
if(MSVC)
|
|
|
|
set_property(TARGET ${_name} APPEND_STRING PROPERTY
|
|
|
|
LINK_FLAGS " /ENTRY:mainCRTStartup")
|
|
|
|
endif()
|
|
|
|
endmacro()
|
|
|
|
|
|
|
|
_add_example(controlgallery
|
|
|
|
controlgallery/main.c
|
|
|
|
${_EXAMPLE_RESOURCES_RC}
|
|
|
|
)
|
|
|
|
|
|
|
|
_add_example(histogram
|
|
|
|
histogram/main.c
|
|
|
|
${_EXAMPLE_RESOURCES_RC}
|
|
|
|
)
|
|
|
|
|
|
|
|
_add_example(cpp-multithread
|
|
|
|
cpp-multithread/main.cpp
|
|
|
|
${_EXAMPLE_RESOURCES_RC}
|
|
|
|
)
|
|
|
|
if(NOT WIN32)
|
|
|
|
target_link_libraries(cpp-multithread pthread)
|
|
|
|
endif()
|
|
|
|
|
2017-01-17 12:30:00 -06:00
|
|
|
_add_example(drawtext
|
2017-01-20 12:25:21 -06:00
|
|
|
drawtext/basic.c
|
2017-01-20 19:38:18 -06:00
|
|
|
drawtext/hittest.c
|
2017-01-17 12:30:00 -06:00
|
|
|
drawtext/main.c
|
|
|
|
${_EXAMPLE_RESOURCES_RC}
|
|
|
|
)
|
2017-01-20 12:25:21 -06:00
|
|
|
target_include_directories(drawtext
|
|
|
|
PRIVATE drawtext)
|
2017-01-17 12:30:00 -06:00
|
|
|
|
2016-06-03 18:25:43 -05:00
|
|
|
add_custom_target(examples
|
|
|
|
DEPENDS
|
|
|
|
controlgallery
|
|
|
|
histogram
|
2017-01-17 12:30:00 -06:00
|
|
|
cpp-multithread
|
|
|
|
drawtext)
|