summaryrefslogtreecommitdiff
path: root/src/strgen/CMakeLists.txt
blob: 08c122335069d38a8c20a4ce7f4314ee8245cde4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
cmake_minimum_required(VERSION 3.5)

if (NOT HOST_BINARY_DIR)
    project(strgen)

    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake")

    set(sourcefiles
            strgen.cpp
            strgen_base.cpp
            ../core/alloc_func.cpp
            ../misc/getoptdata.cpp
            ../string.cpp
    )
    add_definitions(-DSTRGEN)
    add_executable(strgen ${sourcefiles})

    include(Endian)
    add_endian_definition()

    export(TARGETS strgen FILE ${CMAKE_BINARY_DIR}/strgen.cmake)
    add_dependencies(tools strgen)
endif()

if(OPTION_TOOLS_ONLY)
    return()
endif()

# Source Files
add_files(strgen_base.cpp)

# Header Files
add_files(strgen.h)