portal64-still-alive/CMakeLists.txt
Matt Penny 1d0b22df61 Generate dynamic model lists with CMake, + refactor
* When building with CMake, dynamic model lists are now generated
* Factored common code out of generate_*_list.js files to deduplicate
* Better separated generated model lists from main game code
    `dynamic_asset_data.c` and `dynamic_animated_asset_data.c`
    previously #included the corresponding generated headers, and
    `dynamic_asset_loader.c` declared externs for the contents.

    This messiness was likely done so the generated code would be built
    automatically (the Makefile globs all C files under `src/`).

    Now, model list data is output to C source files which are built
    explicitly. This, with some refactoring, allows the previously
    mentioned source files and externs to be removed.

    This is a bit hacky in the Makefile but will be automatic under
    CMake by using target properties.
* Reorganized some files under `tools/`
2024-10-05 21:11:49 -04:00

34 lines
851 B
CMake

cmake_minimum_required(VERSION 3.28)
project(portal64)
# TODO: remove when makefile is no longer in use
add_compile_definitions(CMAKE)
# Tools
# TODO: find automatically
# TODO: test on Windows
set(BLENDER_3_6 "blender")
set(FFMPEG "ffmpeg")
set(GIT "git")
set(IMAGEMAGICK_CONVERT "convert")
set(MPG123 "mpg123")
set(NODEJS "node")
set(PYTHON3 "python")
set(SFZ2N64 "sfz2n64")
set(SOX "sox")
set(VPK "vpk")
set(VTF2PNG "vtf2png")
set(SKELETOOL64 "${PROJECT_SOURCE_DIR}/skelatool64/skeletool64")
# Directories
set(ASSETS_DIR "${PROJECT_SOURCE_DIR}/assets")
set(PAK_DIR "${PROJECT_SOURCE_DIR}/portal_pak_dir")
set(PAK_MODIFIED_DIR "${PROJECT_SOURCE_DIR}/portal_pak_modified")
set(SRC_DIR "${PROJECT_SOURCE_DIR}/src")
set(VPK_DIR "${PROJECT_SOURCE_DIR}/vpk")
add_subdirectory(${ASSETS_DIR})
add_subdirectory(${SRC_DIR})
add_subdirectory(${VPK_DIR})