Add preprocessor definitions
[novacoin.git] / src / CMakeLists.txt
index e592419..f3ab803 100644 (file)
@@ -76,6 +76,7 @@ if(USE_LEVELDB)
     add_subdirectory(additional/leveldb)
     list(APPEND ALL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/txdb-leveldb.cpp)
     list(APPEND ALL_LIBRARIES leveldb)
+    list(APPEND ALL_DEFINITIONS USE_LEVELDB)
 else()
     list(APPEND ALL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/txdb-bdb.cpp)
 endif()
@@ -89,8 +90,10 @@ if (USE_ASM)
     )
 
     list(APPEND ALL_SOURCES ${generic_sources} ${asm_sources})
+    list(APPEND ALL_DEFINITIONS USE_ASM)
 elseif (USE_SSE2)
     list( APPEND ALL_SOURCES ${generic_sources} ${CMAKE_CURRENT_SOURCE_DIR}/crypto/scrypt/intrin/scrypt-sse2.cpp )
+    list(APPEND ALL_DEFINITIONS USE_SSE2)
 else()
     list( APPEND ALL_SOURCES ${generic_sources} ${CMAKE_CURRENT_SOURCE_DIR}/crypto/scrypt/generic/scrypt-generic.cpp )
 endif()
@@ -101,4 +104,5 @@ target_link_libraries(novacoind ${ALL_LIBRARIES})
 
 set_property(TARGET novacoind PROPERTY CXX_STANDARD 17)
 set_property(TARGET novacoind PROPERTY CXX_STANDARD_REQUIRED TRUE)
+set_property(TARGET novacoind PROPERTY COMPILE_DEFINITIONS ${ALL_DEFINITIONS})
 set_property(TARGET novacoind PROPERTY CMAKE_WARN_DEPRECATED FALSE)