From 5aca8b7e5afa3848f06631f6f337a23ac1e5557e Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Sat, 27 Apr 2024 00:01:23 +0300 Subject: [PATCH] Reorganizing fix library --- CMakeLists.txt | 1 + fix/CMakeLists.txt | 5 +++++ {lib => fix}/fix.h | 4 ++-- {lib/win => fix}/fixwin32.h | 0 vecmat/CMakeLists.txt | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) rename {lib => fix}/fix.h (98%) rename {lib/win => fix}/fixwin32.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 413841c6..cd2ca5da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,7 @@ endif() include_directories( "cfile" # TODO: Remove after untying all modules "ddebug" # -*- + "fix" # -*- "lib" # TODO: Remove after untying all modules "Descent3" ${PLATFORM_INCLUDES} diff --git a/fix/CMakeLists.txt b/fix/CMakeLists.txt index 8fd1cba2..765148de 100644 --- a/fix/CMakeLists.txt +++ b/fix/CMakeLists.txt @@ -3,3 +3,8 @@ set(CPPS fix.cpp) add_library(fix STATIC ${HEADERS} ${CPPS}) +target_include_directories(fix PUBLIC + $ +) diff --git a/lib/fix.h b/fix/fix.h similarity index 98% rename from lib/fix.h rename to fix/fix.h index ad52b2bf..15a8bb85 100644 --- a/lib/fix.h +++ b/fix/fix.h @@ -61,7 +61,7 @@ #ifndef _FIX_H #define _FIX_H -#include "math.h" +#include // Disable the "possible loss of data" warning #pragma warning(disable : 4244) @@ -112,7 +112,7 @@ fix FloatToFixFast(float num); // Fixed-point math functions in inline ASM form #if defined(WIN32) -#include "win\fixwin32.h" +#include "fixwin32.h" #endif // use this instead of: diff --git a/lib/win/fixwin32.h b/fix/fixwin32.h similarity index 100% rename from lib/win/fixwin32.h rename to fix/fixwin32.h diff --git a/vecmat/CMakeLists.txt b/vecmat/CMakeLists.txt index dd8543b3..6a5269ce 100644 --- a/vecmat/CMakeLists.txt +++ b/vecmat/CMakeLists.txt @@ -3,3 +3,4 @@ set(CPPS vector.cpp) add_library(vecmat STATIC ${HEADERS} ${CPPS}) +target_link_libraries(vecmat fix)