tools/pas2c/CMakeLists.txt
author koda
Mon, 05 Nov 2012 02:24:28 +0100
branchwebgl
changeset 7973 afb67e34a6b5
child 7985 259231ebf099
permissions -rw-r--r--
add CMakeFile for pas2c, add WEBGL config option
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7973
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
     1
set(pas2c_sources
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
     2
    Main.hs
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
     3
    PascalBasics.hs
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
     4
    PascalParser.hs
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
     5
    PascalPreprocessor.hs
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
     6
    PascalUnitSyntaxTree.hs
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
     7
    pas2c.hs
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
     8
        )
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
     9
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    10
set(pas2c_main ${hedgewars_SOURCE_DIR}/tools/pas2c/Main.hs)
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    11
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    12
set(ghc_flags
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    13
    --make ${pas2c_main}
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    14
    -i${hedgewars_SOURCE_DIR}/tools/pas2c/
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    15
    -o ${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    16
    -odir ${CMAKE_CURRENT_BINARY_DIR}
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    17
    -hidir ${CMAKE_CURRENT_BINARY_DIR}
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    18
    ${haskell_flags})
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    19
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    20
add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}"
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    21
        COMMAND "${ghc_executable}"
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    22
        ARGS ${ghc_flags}
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    23
        MAIN_DEPENDENCY ${hwserv_main}
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    24
        DEPENDS ${hwserver_sources}
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    25
        )
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    26
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    27
add_custom_target(pas2c ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}")
afb67e34a6b5 add CMakeFile for pas2c, add WEBGL config option
koda
parents:
diff changeset
    28