1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- cmake_minimum_required(VERSION 3.1)
- project(demo)
- find_package(lagui REQUIRED)
- include_directories(
- ${LAGUI_INCLUDE_DIRS_ALL}
- )
- add_definitions(-w)
- set(SimplestFiles ${CMAKE_SOURCE_DIR}/simplest.c)
- set(OperatorFiles ${CMAKE_SOURCE_DIR}/operator.c)
- set(SimplePropertiesFiles ${CMAKE_SOURCE_DIR}/simple_properties.c)
- set(WidgetsFiles ${CMAKE_SOURCE_DIR}/widgets.c)
- set(WidgetFlagsFiles ${CMAKE_SOURCE_DIR}/widget_flags.c)
- set(FruitsFiles ${CMAKE_SOURCE_DIR}/fruits.c)
- set(ModellingFiles ${CMAKE_SOURCE_DIR}/modelling_main.c)
- set(CalculatorFiles ${CMAKE_SOURCE_DIR}/calculator.c)
- set(NVGTestFiles ${CMAKE_SOURCE_DIR}/nvgtest.c)
- set(ExampleViewerFiles ${CMAKE_SOURCE_DIR}/example_viewer.c)
- add_executable(simplest ${SimplestFiles})
- add_executable(operator ${OperatorFiles})
- add_executable(simple_properties ${SimplePropertiesFiles})
- add_executable(widgets ${WidgetsFiles})
- add_executable(widget_flags ${WidgetFlagsFiles})
- add_executable(fruits ${FruitsFiles})
- add_executable(modelling_main ${ModellingFiles})
- add_executable(calculator ${CalculatorFiles})
- add_executable(nvgtest ${NVGTestFiles})
- add_executable(example_viewer ${ExampleViewerFiles})
- target_link_libraries(simplest ${LAGUI_SHARED_LIBS} )
- target_link_libraries(operator ${LAGUI_SHARED_LIBS} )
- target_link_libraries(simple_properties ${LAGUI_SHARED_LIBS} )
- target_link_libraries(widgets ${LAGUI_SHARED_LIBS} )
- target_link_libraries(widget_flags ${LAGUI_SHARED_LIBS} )
- target_link_libraries(fruits ${LAGUI_SHARED_LIBS} )
- target_link_libraries(modelling_main ${LAGUI_SHARED_LIBS} )
- target_link_libraries(calculator ${LAGUI_SHARED_LIBS} )
- target_link_libraries(nvgtest ${LAGUI_SHARED_LIBS} )
- target_link_libraries(example_viewer ${LAGUI_SHARED_LIBS} )
- add_custom_command(
- TARGET example_viewer POST_BUILD
- COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/example_source_files
- COMMAND cp ${CMAKE_SOURCE_DIR}/nvgtest.c ${CMAKE_CURRENT_BINARY_DIR}/example_source_files/nvgtest.c
- COMMAND cp ${CMAKE_SOURCE_DIR}/calculator.c ${CMAKE_CURRENT_BINARY_DIR}/example_source_files/calculator.c
- COMMAND cp ${CMAKE_SOURCE_DIR}/widgets.c ${CMAKE_CURRENT_BINARY_DIR}/example_source_files/widgets.c
- COMMAND cp ${CMAKE_SOURCE_DIR}/widget_flags.c ${CMAKE_CURRENT_BINARY_DIR}/example_source_files/widget_flags.c
- COMMAND cp ${CMAKE_SOURCE_DIR}/fruits.c ${CMAKE_CURRENT_BINARY_DIR}/example_source_files/fruits.c
- COMMAND cp ${CMAKE_SOURCE_DIR}/modelling_main.c ${CMAKE_CURRENT_BINARY_DIR}/example_source_files/modelling_main.c
- COMMAND cp ${CMAKE_SOURCE_DIR}/simple_properties.c ${CMAKE_CURRENT_BINARY_DIR}/example_source_files/simple_properties.c
- COMMAND cp ${CMAKE_SOURCE_DIR}/operator.c ${CMAKE_CURRENT_BINARY_DIR}/example_source_files/operator.c
- COMMAND cp ${CMAKE_SOURCE_DIR}/simplest.c ${CMAKE_CURRENT_BINARY_DIR}/example_source_files/simplest.c)
|