Przeglądaj źródła

Make ubuntu happy.

jcsyshc 2 lat temu
rodzic
commit
57bf007876
3 zmienionych plików z 6 dodań i 4 usunięć
  1. 4 2
      CMakeLists.txt
  2. 1 1
      src/utility/assert_utility.h
  3. 1 1
      src/utility/debug_utility.hpp

+ 4 - 2
CMakeLists.txt

@@ -11,7 +11,7 @@ add_compile_options(-mno-avx) # enable avx will cause some stack pointer alignme
 include_directories(./src)
 
 find_package(Boost REQUIRED COMPONENTS iostreams)
-list(APPEND EXTRA_LIBS ${Boost_LIBRARIES} bcrypt)
+list(APPEND EXTRA_LIBS ${Boost_LIBRARIES})
 include_directories(${Boost_INCLUDE_DIRS})
 
 find_package(fmt REQUIRED)
@@ -35,7 +35,9 @@ file(GLOB_RECURSE SRC_FILES ./src/*.cpp)
 add_executable(${PROJECT_NAME} ${SRC_FILES})
 
 IF (WIN32)
-    list(APPEND EXTRA_LIBS ws2_32 wsock32 winmm)
+    list(APPEND EXTRA_LIBS ws2_32 wsock32 winmm bcrypt)
+ELSEIF (UNIX)
+    list(APPEND crypt)
 ENDIF ()
 
 target_link_libraries(${PROJECT_NAME} ${EXTRA_LIBS})

+ 1 - 1
src/utility/assert_utility.h

@@ -15,6 +15,6 @@
 #define assert(_Expression) \
  (void) \
  ((!!(_Expression)) || \
-  (debug_break(),_assert(#_Expression,__FILE__,__LINE__),0))
+  (debug_break(),__assert(#_Expression,__FILE__,__LINE__),0))
 #endif /* _UNICODE||UNICODE */
 #endif /* !defined (NDEBUG) */

+ 1 - 1
src/utility/debug_utility.hpp

@@ -18,7 +18,7 @@
 
 #define DEBUG_PRINT(msg) \
     std::cout << fmt::format("F:{} L:{} {}", \
-                             __FILE_NAME__, __LINE__, msg) \
+                             __FILE__, __LINE__, msg) \
               << std::endl
 
 #define FILE_LINE_TRACE \