project_files/hwc/CMakeLists.txt
author koda
Fri, 09 Nov 2012 14:40:40 +0000
branchwebgl
changeset 7999 bb503cd46516
child 8004 da4c6db6ea6b
permissions -rw-r--r--
add a few cmakefiles for c engine and rtl
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7999
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
     1
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
     2
configure_file(${hedgewars_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
     3
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
     4
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/hwengine.c"
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
     5
        COMMAND "${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}"
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
     6
        ARGS -n hwengine -i "${hedgewars_SOURCE_DIR}/hedgewars" -o "${CMAKE_CURRENT_BINARY_DIR}" -a ./
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
     7
        DEPENDS pas2c
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
     8
        )
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
     9
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
    10
add_custom_target(engine_c ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/hwengine.c")
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
    11
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
    12
add_subdirectory(rtl)
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
    13
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
    14
find_package(GLEW REQUIRED)
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
    15
message("${GLEW_INCLUDE_PATH}")
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
    16
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
    17
include_directories(rtl)
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
    18
file(GLOB engine_src *.c)
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
    19
add_executable(hwengine WIN32 ${engine_src})
bb503cd46516 add a few cmakefiles for c engine and rtl
koda
parents:
diff changeset
    20
add_dependencies(hwengine engine_c fpcrtl)