|
@@ -6,6 +6,9 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
find_package(lagui REQUIRED)
|
|
|
find_package(LuaJIT OPTIONAL_COMPONENTS)
|
|
|
|
|
|
+add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
|
|
|
+add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
|
|
|
+
|
|
|
include_directories(
|
|
|
${LAGUI_INCLUDE_DIRS_ALL}
|
|
|
)
|
|
@@ -61,16 +64,25 @@ endif()
|
|
|
|
|
|
target_link_libraries(example_viewer ${LAGUI_SHARED_LIBS} )
|
|
|
|
|
|
+get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
|
|
+if(GENERATOR_IS_MULTI_CONFIG)
|
|
|
+set(INSTALL_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>)
|
|
|
+else()
|
|
|
+set(INSTALL_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
+endif()
|
|
|
+
|
|
|
+
|
|
|
add_custom_command(
|
|
|
TARGET example_viewer POST_BUILD
|
|
|
- COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/example_source_files
|
|
|
- COMMAND cp ${CMAKE_SOURCE_DIR}/luajit.c ${CMAKE_CURRENT_BINARY_DIR}/example_source_files/luajit.c
|
|
|
- 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)
|
|
|
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${INSTALL_CONFIG_PATH}/example_source_files
|
|
|
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/luajit.c ${INSTALL_CONFIG_PATH}/example_source_files/luajit.c
|
|
|
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/nvgtest.c ${INSTALL_CONFIG_PATH}/example_source_files/nvgtest.c
|
|
|
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/calculator.c ${INSTALL_CONFIG_PATH}/example_source_files/calculator.c
|
|
|
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/widgets.c ${INSTALL_CONFIG_PATH}/example_source_files/widgets.c
|
|
|
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/widget_flags.c ${INSTALL_CONFIG_PATH}/example_source_files/widget_flags.c
|
|
|
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/fruits.c ${INSTALL_CONFIG_PATH}/example_source_files/fruits.c
|
|
|
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/modelling_main.c ${INSTALL_CONFIG_PATH}/example_source_files/modelling_main.c
|
|
|
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/simple_properties.c ${INSTALL_CONFIG_PATH}/example_source_files/simple_properties.c
|
|
|
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/operator.c ${INSTALL_CONFIG_PATH}/example_source_files/operator.c
|
|
|
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/simplest.c ${INSTALL_CONFIG_PATH}/example_source_files/simplest.c
|
|
|
+)
|