diff options
| author | Li Jin <dragon-fly@qq.com> | 2025-11-04 17:00:46 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2025-11-04 17:00:46 +0800 |
| commit | ccd9c7f216c341b50e0a0313ac2eef6a89cee5a4 (patch) | |
| tree | 153ce8766144c7f4288772a1fe668590f60e42a5 /CMakeLists.txt | |
| parent | 03d4fad6ef79ce1788391648e535039a5f29aec3 (diff) | |
| download | yuescript-ccd9c7f216c341b50e0a0313ac2eef6a89cee5a4.tar.gz yuescript-ccd9c7f216c341b50e0a0313ac2eef6a89cee5a4.tar.bz2 yuescript-ccd9c7f216c341b50e0a0313ac2eef6a89cee5a4.zip | |
Included a minimal json lib in yue compiler tool.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c0293b..dd7c7e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -50,7 +50,7 @@ message(STATUS "Lua: " ${LUA}) | |||
| 50 | message(STATUS "Lua include: " ${LUA_INCLUDE_DIR}) | 50 | message(STATUS "Lua include: " ${LUA_INCLUDE_DIR}) |
| 51 | message(STATUS "Lua library: ${LUA_LIBRARIES}") | 51 | message(STATUS "Lua library: ${LUA_LIBRARIES}") |
| 52 | 52 | ||
| 53 | enable_language(CXX) | 53 | enable_language(C CXX) |
| 54 | include_directories(src src/3rdParty ${LUA_INCLUDE_DIR}) | 54 | include_directories(src src/3rdParty ${LUA_INCLUDE_DIR}) |
| 55 | add_definitions(-std=c++17 -O3 -fPIC) | 55 | add_definitions(-std=c++17 -O3 -fPIC) |
| 56 | 56 | ||
| @@ -101,6 +101,7 @@ add_executable(yue | |||
| 101 | src/yuescript/yue_compiler.cpp | 101 | src/yuescript/yue_compiler.cpp |
| 102 | src/yuescript/yuescript.cpp | 102 | src/yuescript/yuescript.cpp |
| 103 | src/yue.cpp | 103 | src/yue.cpp |
| 104 | src/3rdParty/colib/ljson.c | ||
| 104 | ) | 105 | ) |
| 105 | 106 | ||
| 106 | # Add efsw sources only if not in Termux environment | 107 | # Add efsw sources only if not in Termux environment |
| @@ -180,6 +181,7 @@ if (MSVC) | |||
| 180 | target_compile_definitions(yue PRIVATE _SCL_SECURE_NO_WARNINGS) | 181 | target_compile_definitions(yue PRIVATE _SCL_SECURE_NO_WARNINGS) |
| 181 | else () | 182 | else () |
| 182 | target_compile_options(yue PRIVATE -Wall -Wno-long-long -fPIC) | 183 | target_compile_options(yue PRIVATE -Wall -Wno-long-long -fPIC) |
| 184 | set_source_files_properties(src/3rdParty/colib/ljson.c PROPERTIES COMPILE_FLAGS "-std=c99") | ||
| 183 | endif() | 185 | endif() |
| 184 | 186 | ||
| 185 | # Add YUE_NO_WATCHER macro for Termux environment | 187 | # Add YUE_NO_WATCHER macro for Termux environment |
