Skip to content

Commit adda390

Browse files
committed
Add latest q4a/xray-16 linux changes (merge)
2 parents 0e8e009 + 6e9dcd0 commit adda390

File tree

208 files changed

+2660
-645
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+2660
-645
lines changed

CMakeLists.txt

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,54 @@ project(OpenXRay)
44
include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake)
55

66
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
7+
set(CMAKE_SKIP_BUILD_RPATH TRUE)
8+
if(NOT WIN32)
9+
set(CMAKE_INSTALL_PREFIX "") # Skip all *nix-style installing for a while. Use DESTDIR
10+
endif()
11+
712
include(cotire)
813

14+
function(xr_install tgt)
15+
if(NOT MSVC)
16+
install(TARGETS ${tgt} DESTINATION "."
17+
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
18+
GROUP_READ GROUP_EXECUTE
19+
WORLD_READ WORLD_EXECUTE) # chmod 755
20+
else()
21+
install(TARGETS ${tgt}
22+
CONFIGURATIONS Debug
23+
RUNTIME DESTINATION Debug/
24+
LIBRARY DESTINATION Debug/)
25+
install(FILES $<TARGET_PDB_FILE:${tgt}>
26+
CONFIGURATIONS Debug
27+
DESTINATION Debug/ )
28+
install(TARGETS ${tgt}
29+
CONFIGURATIONS Release
30+
RUNTIME DESTINATION Release/
31+
LIBRARY DESTINATION Release/)
32+
endif()
33+
endfunction()
34+
35+
# Use only if install defined outside target directory(like luabind, for example)
36+
function(xr_install_file tgt)
37+
if(NOT MSVC)
38+
install(FILES $<TARGET_FILE:${tgt}> DESTINATION "."
39+
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
40+
GROUP_READ GROUP_EXECUTE
41+
WORLD_READ WORLD_EXECUTE) # chmod 755
42+
else()
43+
install($<TARGET_FILE:${tgt}>
44+
CONFIGURATIONS Debug
45+
RUNTIME DESTINATION Debug/)
46+
install(FILES $<TARGET_PDB_FILE:${tgt}>
47+
CONFIGURATIONS Debug
48+
DESTINATION Debug/ )
49+
install($<TARGET_FILE:${tgt}>
50+
CONFIGURATIONS Release
51+
RUNTIME DESTINATION Release/)
52+
endif()
53+
endfunction()
54+
955
find_program(CCACHE_FOUND ccache)
1056
if(CCACHE_FOUND)
1157
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
@@ -34,6 +80,8 @@ elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
3480
set(LUA_LIBRARIES luajit-debug)
3581
endif()
3682

83+
set(LUA_FOUND true)
84+
3785
message("CMake build ${CMAKE_BUILD_TYPE}, CFLAGS=${CMAKE_C_FLAGS}, CXXFLAGS=${CMAKE_CXX_FLAGS}")
3886

3987
add_definitions(-D_MT -D_CPPUNWIND -DPURE_DYNAMIC_CAST -DDECLARE_SPECIALIZATION -DM_NOSTDCONTAINERS_EXT -DUSE_OGL)

Externals/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
include(luajit.cmake)
22
add_subdirectory(luabind)
3+
xr_install_file(luabind)
34
add_subdirectory(cximage)
45
#add_subdirectory(lzo)
56
#add_subdirectory(NVTT)

Externals/OPCODE/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}
1515

1616
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
1717
target_link_libraries(${PROJECT_NAME} xrCore)
18+
xr_install(${PROJECT_NAME})

Externals/luajit.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ endif()
319319
add_library( ${LIB_NAME} SHARED ${LJCORE_C} ${DEPS} )
320320
set_target_properties ( ${LIB_NAME} PROPERTIES PREFIX "" )
321321
target_link_libraries ( ${LIB_NAME} ${LIBS} )
322+
xr_install(${LIB_NAME})
322323
#endif()
323324

324325
if(NOT ${BUILD_LIB_ONLY})

Externals/ode/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_D
1313
add_definitions(-DdSINGLE -D_SECURE_SCL=0 -DLINUX -D_cdecl= -D__forceinline=inline)
1414

1515
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})
16+
xr_install(${PROJECT_NAME})

0 commit comments

Comments
 (0)