forked from cashapp/zipline
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Zig Fixes and CMAKE for Testing and Comparison.
- Loading branch information
Showing
2 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cmake_minimum_required(VERSION 3.4.1) | ||
project(quickjs) | ||
|
||
set(CMAKE_C_STANDARD 99) | ||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") | ||
|
||
set(JAVA_AWT_LIBRARY NotNeeded) | ||
set(JAVA_AWT_INCLUDE_PATH NotNeeded) | ||
find_package(JNI REQUIRED) | ||
include_directories(${JNI_INCLUDE_DIRS}) | ||
|
||
set(sources "") | ||
|
||
file(GLOB_RECURSE sources "../../native/*.c" "../../native/*.cpp" "../../native/*.S") | ||
file(GLOB_RECURSE pthread_sources "../../native/winpthreads/*.c" "../../native/winpthreads/*.S") | ||
|
||
# Remove pthread sources from main sources list # Shall be done on all except windows | ||
list(REMOVE_ITEM sources ${pthread_sources}) | ||
|
||
add_library(quickjs SHARED ${sources}) | ||
target_compile_definitions(quickjs PUBLIC CONFIG_VERSION="${QUICKJS_VERSION}") | ||
target_link_libraries(quickjs) |