Skip to content

Commit cd1aafe

Browse files
committed
xrCore: fix cmake build
OPCODE: fixed for Linux build, add to cmake
1 parent 077478d commit cd1aafe

File tree

9 files changed

+41
-27
lines changed

9 files changed

+41
-27
lines changed

Externals/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ add_subdirectory(luabind)
33
add_subdirectory(lzo)
44
add_subdirectory(cximage)
55
add_subdirectory(NVTT)
6+
add_subdirectory(OPCODE)
67
#add_subdirectory(gli)
78
#add_subdirectory(glew)

Externals/OPCODE/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
project(OPCODE)
2+
add_dir (
3+
"."
4+
)
5+
6+
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
7+
8+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src ${CMAKE_CURRENT_SOURCE_DIR}/../../sdk/include)
9+
10+
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})
11+
12+
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
13+
target_link_libraries(${PROJECT_NAME} xrCore)

Externals/OPCODE/OPC_TreeBuilders.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#ifndef __OPC_TREEBUILDERS_H__
2121
#define __OPC_TREEBUILDERS_H__
2222

23-
#include "opc_aabbtree.h"
23+
#include "OPC_AABBTree.h"
2424
#include "xrCore/xrPool.h"
2525

2626
//! Tree splitting rules

Externals/OPCODE/OPC_Types.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1111
// Include Guard
1212
#pragma once
13+
#if !defined (_MSC_VER)
14+
#include <stdint.h>
15+
#endif
1316
#ifndef __ICETYPES_H__
1417
#define __ICETYPES_H__
1518

@@ -42,8 +45,13 @@ typedef signed short sword; //!< sizeof(sword) must be 2
4245
typedef unsigned short uword; //!< sizeof(uword) must be 2
4346
typedef signed int sdword; //!< sizeof(sdword) must be 4
4447
typedef unsigned int udword; //!< sizeof(udword) must be 4
48+
#if defined (_MSC_VER)
4549
typedef signed __int64 sqword; //!< sizeof(sqword) must be 8
4650
typedef unsigned __int64 uqword; //!< sizeof(uqword) must be 8
51+
#else
52+
typedef int64_t sqword; //!< sizeof(sqword) must be 8
53+
typedef uint64_t uqword; //!< sizeof(uqword) must be 8
54+
#endif
4755
typedef float float32; //!< sizeof(float32) must be 4
4856
typedef double float64; //!< sizeof(float64) must be 4
4957

@@ -69,10 +77,11 @@ typedef udword RTYPE; //!< Relationship-type (!) between owners and references
6977
#define INVALID_NUMBER 0xDEADBEEF //!< Standard junk value
7078

7179
// Define BOOL if needed
80+
#if defined (_MSC_VER)
7281
#ifndef BOOL
7382
typedef int BOOL; //!< Another boolean type.
7483
#endif
75-
84+
#endif
7685
//! Union of a float and a sdword
7786
typedef union
7887
{

Externals/OPCODE/Opcode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ using namespace IceCore;
5858
#endif
5959

6060
#ifndef __ICEMATHS_H__
61-
#include <Math.h>
61+
#include <math.h>
6262
#define ICEMATHS_API OPCODE_API
6363
namespace IceMaths
6464
{

cmake/utils.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
macro(add_dir DIRS)
22
foreach(dir ${DIRS})
3-
message( "adding " ${dir} )
3+
message( "adding ${dir} to ${PROJECT_NAME}")
44
include_directories (${dir} )
5-
file( GLOB ${dir}__INCLUDES_H ${dir} *.h)
6-
file( GLOB ${dir}__INCLUDES_HPP ${dir} *.hpp)
7-
list( APPEND XRCORE__INCLUDES ${${dir}__INCLUDES_H} ${${dir}__INCLUDES_HPP} )
8-
file( GLOB ${dir}__SOURCES ${dir} *.cpp)
9-
list( APPEND XRCORE__SOURCES ${${dir}__SOURCES} )
5+
file( GLOB ${dir}__INCLUDES_H ${dir} ${dir}/*.h)
6+
file( GLOB ${dir}__INCLUDES_HPP ${dir} ${dir}/*.hpp)
7+
list( APPEND ${PROJECT_NAME}__INCLUDES ${${dir}__INCLUDES_H} ${${dir}__INCLUDES_HPP} )
8+
file( GLOB ${dir}__SOURCES ${dir} ${dir}/*.cpp)
9+
list( APPEND ${PROJECT_NAME}__SOURCES ${${dir}__SOURCES} )
1010
endforeach()
1111
endmacro()

src/Include/xrRender/Kinematics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#pragma once
44

55
#include "RenderVisual.h"
6-
#include "Layers\xrRender\KinematicsAddBoneTransform.hpp" //--#SM+#--
6+
#include "Layers/xrRender/KinematicsAddBoneTransform.hpp" //--#SM+#--
77

88
typedef void (*UpdateCallback)(IKinematics* P);
99

src/utils.cmake

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/xrCore/CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
add_dir (
1+
project(xrCore)
2+
3+
list(APPEND DIRS
24
"."
35
"Animation"
46
"Compression"
@@ -10,13 +12,13 @@ add_dir (
1012
"Text"
1113
"Threading"
1214
"XML"
13-
xrCore)
15+
)
1416

15-
message( "path " ${CMAKE_CURRENT_SOURCE_DIR} )
17+
add_dir("${DIRS}")
1618

1719
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../../sdk/include)
1820

19-
add_library(xrCore SHARED ${XRCORE__SOURCES} ${XRCORE__INCLUDES})
21+
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})
2022

21-
set_target_properties(xrCore PROPERTIES PREFIX "")
22-
target_link_libraries(xrCore ${SDL2_LIB} ${OPENSSL_LIBRARIES} ${LZO_LIBRARY} ${CRYPTO_LIBRARY} ${PUGIXML_LIBRARY})
23+
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
24+
target_link_libraries(${PROJECT_NAME} ${SDL2_LIB} ${OPENSSL_LIBRARIES} ${LZO_LIBRARY} ${CRYPTO_LIBRARY} ${PUGIXML_LIBRARY})

0 commit comments

Comments
 (0)