tools/pas2c/CMakeLists.txt
author Wuzzy <Wuzzy2@mail.ru>
Thu, 26 Oct 2017 07:53:13 +0200
changeset 12778 f1b3e33b0a0a
parent 9238 84e591af6c29
child 13868 4f123ac4f002
permissions -rw-r--r--
Change SD music for Halloween and Hoggywood themes (old tracks) Rationale: - Halloween: hell music is the logical continuation, default SD music just ruins the atmosphere - Hoggywood: default SD music fits better here; the hell music was historically chosen when there wasn't a generic music yet

find_package(GHC REQUIRED)

set(pas2c_sources
        Main.hs
        PascalBasics.hs
        PascalParser.hs
        PascalPreprocessor.hs
        PascalUnitSyntaxTree.hs
        Pas2C.hs
    )

set(pas2c_main ${CMAKE_SOURCE_DIR}/tools/pas2c/Main.hs)

set(ghc_flags
        --make ${pas2c_main}
        -i${CMAKE_SOURCE_DIR}/tools/pas2c/
        -o ${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}
        -odir ${CMAKE_CURRENT_BINARY_DIR}
        -hidir ${CMAKE_CURRENT_BINARY_DIR}
        ${haskell_flags}
    )

add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}"
        COMMAND "${GHC_EXECUTABLE}"
        ARGS ${ghc_flags}
        MAIN_DEPENDENCY ${hwserv_main}
        DEPENDS ${hwserver_sources}
        )

add_custom_target(pas2c ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/pas2c${CMAKE_EXECUTABLE_SUFFIX}")