2 cmake_minimum_required(VERSION 2.8)
4 include("${SRC_DIR}/build_options.cmake")
6 set(SRC_LIST voglgen.cpp)
7 set(SPEC_DIR "${CMAKE_SOURCE_DIR}/../glspec")
9 add_definitions(-DTIXML_USE_STL)
13 ${TinyXML_INCLUDE_DIRS}
16 add_executable(${PROJECT_NAME} ${SRC_LIST})
18 target_link_libraries(${PROJECT_NAME}
23 # Generate stuff and copy it. Generator must handle copying internally in the future.
24 add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
25 COMMAND ${PROJECT_NAME} --specdir ${SPEC_DIR}
26 COMMAND mkdir -p "${CMAKE_BINARY_DIR}/voglinc/"
27 COMMAND mv "${SPEC_DIR}/*.inc" "${CMAKE_BINARY_DIR}/voglinc/"
28 COMMAND mv "${SPEC_DIR}/libvogltrace_linker_script.txt" "${CMAKE_SOURCE_DIR}/vogltrace/")
29 add_custom_target(voglgen_make_inc DEPENDS ${PROJECT_NAME})
31 build_options_finalize()