summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--Opcode/CMakeLists.txt54
-rw-r--r--Stars45/CMakeLists.txt7
-rw-r--r--nGenEx/CMakeLists.txt7
4 files changed, 67 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8cf8eda..7e90c88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,7 @@ add_subdirectory(Magic2)
add_subdirectory(NetEx)
add_subdirectory(nGenEx)
add_subdirectory(ogg) # is a third-party library.
-# add_subdirectory(Opcode) # is a third-party library.
+add_subdirectory(Opcode) # is a third-party library.
add_subdirectory(Parser)
add_subdirectory(Stars45)
# /Starshatter contains VS-related files.
diff --git a/Opcode/CMakeLists.txt b/Opcode/CMakeLists.txt
new file mode 100644
index 0000000..020830f
--- /dev/null
+++ b/Opcode/CMakeLists.txt
@@ -0,0 +1,54 @@
+project(Opcode)
+add_library(
+ Opcode
+ SHARED
+ OPC_AABBCollider.cpp
+ OPC_AABBTree.cpp
+ OPC_BaseModel.cpp
+ OPC_BoxPruning.cpp
+ OPC_Collider.cpp
+ OPC_Common.cpp
+ OPC_HybridModel.cpp
+ OPC_LSSCollider.cpp
+ OPC_MeshInterface.cpp
+ OPC_Model.cpp
+ OPC_OBBCollider.cpp
+ OPC_OptimizedTree.cpp
+ OPC_Picking.cpp
+ OPC_PlanesCollider.cpp
+ OPC_RayCollider.cpp
+ OPC_SphereCollider.cpp
+ OPC_SweepAndPrune.cpp
+ OPC_TreeBuilders.cpp
+ OPC_TreeCollider.cpp
+ OPC_VolumeCollider.cpp
+ Opcode.cpp
+ StdAfx.cpp
+ Ice/IceAABB.cpp
+ Ice/IceContainer.cpp
+ Ice/IceHPoint.cpp
+ Ice/IceIndexedTriangle.cpp
+ Ice/IceMatrix3x3.cpp
+ Ice/IceMatrix4x4.cpp
+ Ice/IceOBB.cpp
+ Ice/IcePlane.cpp
+ Ice/IcePoint.cpp
+ Ice/IceRandom.cpp
+ Ice/IceRay.cpp
+ Ice/IceRevisitedRadix.cpp
+ Ice/IceSegment.cpp
+ Ice/IceTriangle.cpp
+ Ice/IceUtils.cpp
+ )
+target_include_directories(
+ Opcode
+ PRIVATE .
+ )
+target_precompile_headers(
+ Opcode
+ PUBLIC StdAfx.h
+ )
+target_compile_definitions(
+ Opcode
+ PUBLIC OPCODE_EXPORTS
+ )
diff --git a/Stars45/CMakeLists.txt b/Stars45/CMakeLists.txt
index 73d3003..56b1cca 100644
--- a/Stars45/CMakeLists.txt
+++ b/Stars45/CMakeLists.txt
@@ -200,6 +200,11 @@ add_executable(
target_include_directories(
Stars45
PUBLIC .
+ PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../Opcode/OpcodeLib
+ )
+target_precompile_headers(
+ nGenEx
+ PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../Opcode/OpcodeLib/StdAfx.h
)
target_link_libraries(
Stars45
@@ -212,5 +217,5 @@ target_link_libraries(
PUBLIC Vorbis::vorbisfile
PUBLIC Ogg::ogg
PUBLIC Png::png
- # TODO: PUBLIC Opcode::opcode
+ PUBLIC Opcode # FIXME: Add opcode to a namespace.
)
diff --git a/nGenEx/CMakeLists.txt b/nGenEx/CMakeLists.txt
index fe54396..a73d239 100644
--- a/nGenEx/CMakeLists.txt
+++ b/nGenEx/CMakeLists.txt
@@ -80,6 +80,11 @@ target_include_directories(
nGenEx
PUBLIC .
PUBLIC $ENV{DXSDK_DIR}/Include
+ PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../Opcode/OpcodeLib # FIXME: Opcode is badly injured.
+ )
+target_precompile_headers(
+ nGenEx
+ PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../Opcode/OpcodeLib/StdAfx.h
)
target_link_libraries(
nGenEx
@@ -90,5 +95,5 @@ target_link_libraries(
PUBLIC Vorbis::vorbisfile
PUBLIC Ogg::ogg
PUBLIC Png::png
- # TODO: PUBLIC Opcode::opcode
+ PUBLIC Opcode
)