1 cmake_minimum_required (VERSION 2.6)
4 join_list("${CASPARCG_MODULE_INCLUDE_STATEMENTS}" "\n" CASPARCG_MODULE_INCLUDE_STATEMENTS)
5 join_list("${CASPARCG_MODULE_INIT_STATEMENTS}" "\n" CASPARCG_MODULE_INIT_STATEMENTS)
6 join_list("${CASPARCG_MODULE_UNINIT_STATEMENTS}" "\n" CASPARCG_MODULE_UNINIT_STATEMENTS)
7 join_list("${CASPARCG_MODULE_COMMAND_LINE_ARG_INTERCEPTORS_STATEMENTS}" "\n" CASPARCG_MODULE_COMMAND_LINE_ARG_INTERCEPTORS_STATEMENTS)
8 configure_file("${PROJECT_SOURCE_DIR}/included_modules.tmpl" "${PROJECT_SOURCE_DIR}/included_modules.h")
11 set(OS_SPECIFIC_SOURCES
16 elseif (CMAKE_COMPILER_IS_GNUCXX)
17 set(OS_SPECIFIC_SOURCES
29 default_audio_config.h
36 add_executable(casparcg ${SOURCES} ${HEADERS} ${OS_SPECIFIC_SOURCES})
37 add_precompiled_header(casparcg stdafx.h FORCEINCLUDE)
39 add_executable(generate_docs generate_docs.cpp included_modules.h)
40 target_link_libraries(generate_docs
44 "${CASPARCG_MODULE_PROJECTS}"
50 include_directories(..)
51 include_directories(${BOOST_INCLUDE_PATH})
52 include_directories(${RXCPP_INCLUDE_PATH})
53 include_directories(${TBB_INCLUDE_PATH})
55 source_group(sources ./*)
58 target_link_libraries(casparcg
63 target_link_libraries(casparcg
69 "${CASPARCG_MODULE_PROJECTS}"
74 add_custom_target(casparcg_copy_dependencies ALL)
76 casparcg_add_runtime_dependency("${LIBERATION_FONTS_BIN_PATH}/LiberationSans-Regular.ttf")
77 casparcg_add_runtime_dependency("${CMAKE_CURRENT_SOURCE_DIR}/casparcg.config")
79 set(OUTPUT_FOLDER "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
80 add_custom_command(TARGET casparcg_copy_dependencies POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory \"${OUTPUT_FOLDER}\")
82 foreach(FILE_TO_COPY ${CASPARCG_RUNTIME_DEPENDENCIES})
83 if(IS_DIRECTORY ${FILE_TO_COPY})
84 get_filename_component(FOLDER_NAME "${FILE_TO_COPY}" NAME)
85 add_custom_command(TARGET casparcg_copy_dependencies POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory \"${FILE_TO_COPY}\" \"${OUTPUT_FOLDER}/${FOLDER_NAME}\")
86 add_custom_command(TARGET casparcg_copy_dependencies POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory \"${FILE_TO_COPY}\" \"${CMAKE_CURRENT_BINARY_DIR}/${FOLDER_NAME}\")
88 add_custom_command(TARGET casparcg_copy_dependencies POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy \"${FILE_TO_COPY}\" \"${OUTPUT_FOLDER}/\")
89 add_custom_command(TARGET casparcg_copy_dependencies POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy \"${FILE_TO_COPY}\" \"${CMAKE_CURRENT_BINARY_DIR}/\")
91 endforeach(FILE_TO_COPY)