Skip to content

Commit 02b3d55

Browse files
committed
Fix linux build
1 parent 011a5a9 commit 02b3d55

File tree

20 files changed

+46
-41
lines changed

20 files changed

+46
-41
lines changed

CMakeLists.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,18 @@ list(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/sdk")
252252
list(APPEND CMAKE_LIBRARY_PATH "${CMAKE_SOURCE_DIR}/sdk/libraries/${ARCH_TYPE}")
253253
#list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/sdk/cmake")
254254

255-
set(SDL2_DIR "${CMAKE_SOURCE_DIR}/sdk/cmake")
255+
# TODO move
256+
if(MSVC)
257+
set(SDL2_DIR "${CMAKE_SOURCE_DIR}/sdk/cmake")
258+
endif()
259+
256260
find_package(SDL2 REQUIRED CONFIG)
257261

258-
#set(CMAKE_FIND_DEBUG_MODE TRUE)
259-
find_package(OpenAL REQUIRED)
260-
#set(CMAKE_FIND_DEBUG_MODE FALSE)
262+
find_package(mimalloc)
263+
264+
if(NOT TARGET mimalloc::mimalloc)
265+
add_library(mimalloc::mimalloc ALIAS mimalloc)
266+
endif()
261267

262268
if (NOT WIN32)
263269
find_package(SDL2 2.0.18 REQUIRED)
@@ -280,7 +286,7 @@ if (NOT WIN32)
280286
find_package(Vorbis REQUIRED)
281287
find_package(Theora REQUIRED)
282288
find_package(LZO REQUIRED)
283-
find_package(mimalloc NAMES mimalloc2 mimalloc2.0 mimalloc)
289+
284290
endif()
285291

286292
option(XRAY_USE_LUAJIT "Use LuaJIT" ON)

Externals/BugTrap-proj/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ target_link_libraries(bugtrap_bugtrap
2828
shlwapi.lib
2929
version.lib
3030
wininet.lib
31+
vfw32.lib
3132
)
3233

3334
target_link_options(bugtrap_bugtrap

Externals/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ add_subdirectory(GameSpy)
1010
add_subdirectory(OPCODE)
1111
add_subdirectory(ode)
1212
add_subdirectory(imgui-proj)
13-
add_subdirectory(DiscordGameSDK)
1413

1514
if (MSVC)
1615
add_subdirectory(BugTrap-proj)
@@ -27,13 +26,12 @@ if (MSVC)
2726

2827
add_subdirectory(zlib-proj)
2928

30-
find_package(mimalloc)
31-
3229
find_package(DbgHelp)
3330
find_package(FaultRep)
3431
find_package(EAX)
3532

3633
add_subdirectory(OpenAutomate-proj)
34+
add_subdirectory(DiscordGameSDK)
3735
endif()
3836

3937
if (NOT TARGET xrLuabind)

Externals/GameSpy

Externals/LuaJIT-proj/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
# For details see the COPYRIGHT file distributed with LuaDist.
55
# Please note that the package source code is licensed under its own license.
66

7+
project(xrLuaJIT C CXX ASM)
8+
79
set(MAJVER 2)
810
set(MINVER 0)
911
set(RELVER 5)
1012
set(ABIVER 5.1)
1113
set(NODOTABIVER 51)
1214

13-
option(LUAJIT_BUILD_STATIC_LIB "Build as static library" ON)
15+
option(LUAJIT_BUILD_STATIC_LIB "Build as static library" OFF)
1416
option(LUAJIT_BUILD_APP "Build application" OFF)
1517

1618
if (WIN32)
@@ -91,7 +93,7 @@ endif()
9193
macro(add_buildvm_target target mode)
9294
add_custom_command(
9395
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${target}"
94-
COMMAND $<TARGET_FILE:buildvm> ARGS -m ${mode} -o ${CMAKE_CURRENT_BINARY_DIR}/${target} ${ARGN}
96+
COMMAND "${BUILDVM_FILE}" ARGS -m ${mode} -o ${CMAKE_CURRENT_BINARY_DIR}/${target} ${ARGN}
9597
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
9698
DEPENDS buildvm ${ARGN}
9799
)
@@ -103,7 +105,7 @@ if (WIN32)
103105
else()
104106
add_buildvm_target(lj_vm.S ${LJVM_MODE})
105107
set(LJ_VM_SRC "${CMAKE_CURRENT_BINARY_DIR}/lj_vm.S")
106-
set_source_files_properties("${LJ_VM_SRC}" PROPERTIES LANGUAGE CXX)
108+
#set_source_files_properties("${LJ_VM_SRC}" PROPERTIES LANGUAGE CXX)
107109
endif()
108110

109111
add_buildvm_target("lj_bcdef.h" "bcdef" ${LJLIB_C})

cmake/packaging.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ if (UNIX)
1818
# as it uses debian core.
1919
find_file(DEBIAN_FOUND debian_version debconf.conf PATHS /etc)
2020

21+
mark_as_advanced(FEDORA_FOUND REDHAT_FOUND CENTOS_FOUND DEBIAN_FOUND)
22+
2123
# --------------------------------------------------
2224
# Uninstall target
2325
# --------------------------------------------------
File renamed without changes.
File renamed without changes.

cmake/FindEAX.cmake renamed to cmake/windows/FindEAX.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ find_path(EAX_INCLUDE_DIR
66

77
find_library(EAX_LIBRARY
88
NAMES eax
9-
#PATHS "${CMAKE_SOURCE_DIR}/sdk/libraries"
109
PATHS "${CMAKE_SOURCE_DIR}/sdk/binaries"
1110
NO_DEFAULT_PATH
1211
)
@@ -15,7 +14,7 @@ mark_as_advanced(
1514
EAX_INCLUDE_DIR
1615
EAX_LIBRARY
1716
)
18-
#DXSDK::D3D9
17+
1918
add_library(EAX_EAX STATIC IMPORTED GLOBAL)
2019
add_library(EAX::EAX ALIAS EAX_EAX)
2120

File renamed without changes.

0 commit comments

Comments
 (0)