-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
41 lines (36 loc) · 1.15 KB
/
CMakeLists.txt
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
34
35
36
37
38
39
40
41
# Yes, you will need to change this to wherever you have LCC installed.
set(
LCC_PATH
"~/Programming/play/LensorCompilerCollection"
CACHE FILEPATH
"Path to the Lensor Compiler Collection (LCC) on your system.
If you don't have LCC yet, you can get it as part of the Glint Standard Library at https://github.com/LensPlaysGames/GlintStandardLibrary"
)
if(NOT EXISTS ${LCC_PATH})
message(
FATAL_ERROR
"LCC_PATH does not exist; you probably need to set this CMake option to wherever you have LCC installed.
If you don't have LCC yet, you can get it as part of the Glint Standard Library at https://github.com/LensPlaysGames/GlintStandardLibrary
LCC_PATH: ${LCC_PATH}"
)
endif()
list(APPEND CMAKE_MODULE_PATH "${LCC_PATH}/cmake")
cmake_minimum_required(VERSION 3.14)
project(GlintVerySimpleLexer LANGUAGES C Glint)
add_executable(
lexer
src/main.g
)
target_link_directories(
lexer
PUBLIC
.
)
# libgstd.a is the Glint Standard Library.
# Clone and build it at https://github.com/LensPlaysGames/GlintStandardLibrary.
# Once built, just copy the library into this directory so it's easy to find.
target_link_libraries(
lexer
PUBLIC
libgstd.a
)