include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${SRC_DIR}/voglcore
- ${SRC_DIR}/voglinc
+ ${CMAKE_BINARY_DIR}/voglinc
${SRC_DIR}/voglcommon
- ${SRC_DIR}/libtelemetry
+ ${SRC_DIR}/libtelemetry
${SRC_DIR}/extlib/loki/include/loki
)
)
add_executable(${PROJECT_NAME} ${SRC_LIST})
+add_dependencies(${PROJECT_NAME} voglgen_make_inc)
target_link_libraries(${PROJECT_NAME}
${TELEMETRY_LIBRARY}
include_directories(
${SRC_DIR}/extlib/loki/include/loki
${SRC_DIR}/voglcommon
- ${SRC_DIR}/voglinc
+ ${CMAKE_BINARY_DIR}/voglinc
${SRC_DIR}/voglcore
${SRC_DIR}/libtelemetry
${SRC_DIR}/libbacktrace
add_compiler_flag("-fPIC")
add_library(${PROJECT_NAME} ${SRC_LIST})
+add_dependencies(${PROJECT_NAME} voglgen_make_inc)
target_link_libraries(${PROJECT_NAME} backtrace)
build_options_finalize()
${SRC_DIR}
${SRC_DIR}/voglcore
${SRC_DIR}/voglcommon
- ${SRC_DIR}/voglinc
+ ${CMAKE_BINARY_DIR}/voglinc
${SRC_DIR}/extlib/loki/include/loki
${SRC_DIR}/libtelemetry
${CMAKE_CURRENT_BINARY_DIR}
${QT_GEN_RESOURCE_RCC_LIST}
)
+add_dependencies(${PROJECT_NAME} voglgen_make_inc)
+
target_link_libraries(${PROJECT_NAME}
${QT_QTMAIN_LIBRARY}
${QT_QTCORE_LIBRARY}
include("${SRC_DIR}/build_options.cmake")
set(SRC_LIST voglgen.cpp)
+set(SPEC_DIR "${CMAKE_SOURCE_DIR}/../glspec")
add_definitions(-DTIXML_USE_STL)
${TinyXML_LIBRARIES}
)
+# Generate stuff and copy it. Generator must handle copying internally in the future.
+add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
+ COMMAND ${PROJECT_NAME} --specdir ${SPEC_DIR}
+ COMMAND mkdir -p "${CMAKE_BINARY_DIR}/voglinc/"
+ COMMAND mv "${SPEC_DIR}/*.inc" "${CMAKE_BINARY_DIR}/voglinc/"
+ COMMAND mv "${SPEC_DIR}/libvogltrace_linker_script.txt" "${CMAKE_SOURCE_DIR}/vogltrace/")
+add_custom_target(voglgen_make_inc DEPENDS ${PROJECT_NAME})
+
build_options_finalize()
include_directories(
${SRC_DIR}/voglcore
- ${SRC_DIR}/voglinc
+ ${CMAKE_BINARY_DIR}/voglinc
${SRC_DIR}/voglcommon
${SRC_DIR}/libtelemetry
${SRC_DIR}/extlib/loki/include/loki
# add_compiler_flag("-DVOGL_REMOTING")
add_executable(${PROJECT_NAME} ${SRC_LIST})
+add_dependencies(${PROJECT_NAME} voglgen_make_inc)
target_link_libraries(${PROJECT_NAME}
${TELEMETRY_LIBRARY}
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${SRC_DIR}/voglcore
- ${SRC_DIR}/voglinc
+ ${CMAKE_BINARY_DIR}/voglinc
${SRC_DIR}/voglcommon
- ${SRC_DIR}/libtelemetry
- ${SRC_DIR}/libbacktrace
+ ${SRC_DIR}/libtelemetry
+ ${SRC_DIR}/libbacktrace
${SRC_DIR}/extlib/loki/include/loki
)
)
add_executable(${PROJECT_NAME} ${SRC_LIST})
+add_dependencies(${PROJECT_NAME} voglgen_make_inc)
target_link_libraries(${PROJECT_NAME}
backtrace
${SRC_DIR}/libbacktrace
${SRC_DIR}/extlib/loki/include/loki
${SRC_DIR}/voglcommon
- ${SRC_DIR}/voglinc
+ ${CMAKE_BINARY_DIR}/voglinc
${SRC_DIR}/voglcore
${SRC_DIR}/libtelemetry
)
add_shared_linker_flag("-Wl,--version-script=${PROJECT_SOURCE_DIR}/libvogltrace_linker_script.txt")
add_library(${PROJECT_NAME} SHARED ${SRC_LIST})
+add_dependencies(${PROJECT_NAME} voglgen_make_inc)
target_link_libraries(${PROJECT_NAME}
${TELEMETRY_LIBRARY}