瀏覽代碼

Update CMakeLists.txt

blueloveTH 9 月之前
父節點
當前提交
1dabcd12db
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      CMakeLists.txt

+ 5 - 3
CMakeLists.txt

@@ -44,6 +44,11 @@ if(PK_ENABLE_OS)
     add_definitions(-DPK_ENABLE_OS=1)
 endif()
 
+if(PK_ENABLE_DETERMINISM)
+    add_subdirectory(3rd/dmath/dmath)
+    add_definitions(-DPK_ENABLE_DETERMINISM=1)
+endif()
+
 if(PK_ENABLE_WATCHDOG)
     add_definitions(-DPK_ENABLE_WATCHDOG=1)
 endif()
@@ -80,10 +85,7 @@ endif()
 
 
 if(PK_ENABLE_DETERMINISM)
-    add_subdirectory(3rd/dmath/dmath)
     target_link_libraries(${PROJECT_NAME} dmath)
-    add_definitions(-DPK_ENABLE_DETERMINISM=1)
-
     if(MSVC)
         target_link_options(${PROJECT_NAME} PRIVATE /FORCE:MULTIPLE)
     endif()