Line 0
Link Here
|
|
|
1 |
--- src/CMakeLists.txt.orig 2019-01-20 17:58:02 UTC |
2 |
+++ src/CMakeLists.txt |
3 |
@@ -13,7 +13,6 @@ include( CheckIncludeFile ) |
4 |
include( CheckIncludeFiles ) |
5 |
include( CheckLibraryExists ) |
6 |
include( FindPkgConfig ) |
7 |
-include( TargetArch ) |
8 |
|
9 |
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) |
10 |
option( NO_STRIP "Do not strip Release or MinSizeRel builds" ) |
11 |
@@ -33,8 +32,6 @@ if( APPLE ) |
12 |
option( OSX_COCOA_BACKEND "Use native Cocoa backend instead of SDL" ON ) |
13 |
endif() |
14 |
|
15 |
-target_architecture(ZDOOM_TARGET_ARCH) |
16 |
- |
17 |
if( ${ZDOOM_TARGET_ARCH} MATCHES "x86_64" ) |
18 |
set( X64 64 ) |
19 |
endif() |
20 |
@@ -460,9 +457,15 @@ add_custom_target( revision_check ALL |
21 |
# Libraries ZDoom needs |
22 |
|
23 |
message( STATUS "Fluid synth libs: ${FLUIDSYNTH_LIBRARIES}" ) |
24 |
-set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${GME_LIBRARIES}" "${ASMJIT_LIBRARIES}" "${CMAKE_DL_LIBS}" ) |
25 |
-include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" "${GME_INCLUDE_DIR}" "${ASMJIT_INCLUDE_DIR}" ) |
26 |
+set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${GME_LIBRARIES}" "${CMAKE_DL_LIBS}" ) |
27 |
+include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" "${GME_INCLUDE_DIR}" ) |
28 |
|
29 |
+if( ${HAVE_VM_JIT} ) |
30 |
+ add_definitions( -DHAVE_VM_JIT ) |
31 |
+ include_directories( "${ASMJIT_INCLUDE_DIR}" ) |
32 |
+ set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ASMJIT_LIBRARIES}") |
33 |
+endif() |
34 |
+ |
35 |
if( SNDFILE_FOUND ) |
36 |
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${SNDFILE_LIBRARIES}" ) |
37 |
include_directories( "${SNDFILE_INCLUDE_DIRS}" ) |
38 |
@@ -799,6 +802,17 @@ set( NOT_COMPILED_SOURCE_FILES |
39 |
zcc-parse.h |
40 |
) |
41 |
|
42 |
+set( VM_JIT_SOURCES |
43 |
+ scripting/vm/jit.cpp |
44 |
+ scripting/vm/jit_runtime.cpp |
45 |
+ scripting/vm/jit_call.cpp |
46 |
+ scripting/vm/jit_flow.cpp |
47 |
+ scripting/vm/jit_load.cpp |
48 |
+ scripting/vm/jit_math.cpp |
49 |
+ scripting/vm/jit_move.cpp |
50 |
+ scripting/vm/jit_store.cpp |
51 |
+) |
52 |
+ |
53 |
# This is disabled for now because I cannot find a way to give the .pch file a different name. |
54 |
# Visual C++ 2015 seems hell-bent on only allowing one .pch file with the same name as the executable. |
55 |
#enable_precompiled_headers( g_pch2.h FASTMATH_PCH_SOURCES ) |
56 |
@@ -1174,14 +1188,6 @@ set (PCH_SOURCES |
57 |
scripting/decorate/thingdef_states.cpp |
58 |
scripting/vm/vmexec.cpp |
59 |
scripting/vm/vmframe.cpp |
60 |
- scripting/vm/jit.cpp |
61 |
- scripting/vm/jit_runtime.cpp |
62 |
- scripting/vm/jit_call.cpp |
63 |
- scripting/vm/jit_flow.cpp |
64 |
- scripting/vm/jit_load.cpp |
65 |
- scripting/vm/jit_math.cpp |
66 |
- scripting/vm/jit_move.cpp |
67 |
- scripting/vm/jit_store.cpp |
68 |
scripting/zscript/ast.cpp |
69 |
scripting/zscript/zcc_compile.cpp |
70 |
scripting/zscript/zcc_parser.cpp |
71 |
@@ -1256,6 +1262,12 @@ set (PCH_SOURCES |
72 |
events.cpp |
73 |
) |
74 |
|
75 |
+if( ${HAVE_VM_JIT} ) |
76 |
+ set( PCH_SOURCES ${PCH_SOURCES} ${VM_JIT_SOURCES} ) |
77 |
+else() |
78 |
+ set( NOT_COMPILED_SOURCE_FILES ${NOT_COMPILED_SOURCE_FILES} ${VM_JIT_SOURCES} ) |
79 |
+endif() |
80 |
+ |
81 |
enable_precompiled_headers( g_pch.h PCH_SOURCES ) |
82 |
|
83 |
add_executable( zdoom WIN32 MACOSX_BUNDLE |
84 |
@@ -1263,7 +1275,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE |
85 |
${NOT_COMPILED_SOURCE_FILES} |
86 |
__autostart.cpp |
87 |
${SYSTEM_SOURCES} |
88 |
- ${X86_SOURCES} |
89 |
${FASTMATH_SOURCES} |
90 |
${PCH_SOURCES} |
91 |
x86.cpp |