Merge pull request #3255 from yuriks/trim-cryptopp
cryptopp: Build only required files
This commit is contained in:
commit
176ed77506
|
@ -116,21 +116,45 @@ endif()
|
||||||
# Library headers
|
# Library headers
|
||||||
file(GLOB cryptopp_HEADERS cryptopp/*.h)
|
file(GLOB cryptopp_HEADERS cryptopp/*.h)
|
||||||
|
|
||||||
# Library sources. You can use the GNUmakefile to generate the list: `make sources`.
|
# Library sources.
|
||||||
file(GLOB cryptopp_SOURCES cryptopp/*.cpp)
|
# These have been trimmed to include only things Citra uses. This speeds up
|
||||||
list(REMOVE_ITEM cryptopp_SOURCES
|
# compiles and reduces the amount of compilation breakage.
|
||||||
# These are removed in the original CMakeLists.txt
|
set(cryptopp_SOURCES
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/pch.cpp
|
cryptopp/algparam.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/simple.cpp
|
cryptopp/asn.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/winpipes.cpp
|
cryptopp/authenc.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/cryptlib_bds.cpp
|
cryptopp/basecode.cpp
|
||||||
${cryptopp_SOURCES_TEST}
|
cryptopp/ccm.cpp
|
||||||
|
cryptopp/cpu.cpp
|
||||||
|
cryptopp/cryptlib.cpp
|
||||||
|
cryptopp/dll.cpp
|
||||||
|
cryptopp/ec2n.cpp
|
||||||
|
cryptopp/ecp.cpp
|
||||||
|
cryptopp/filters.cpp
|
||||||
|
cryptopp/fips140.cpp
|
||||||
|
cryptopp/gf2n.cpp
|
||||||
|
cryptopp/gfpcrypt.cpp
|
||||||
|
cryptopp/hex.cpp
|
||||||
|
cryptopp/hmac.cpp
|
||||||
|
cryptopp/hrtimer.cpp
|
||||||
|
cryptopp/integer.cpp
|
||||||
|
cryptopp/iterhash.cpp
|
||||||
|
cryptopp/md5.cpp
|
||||||
|
cryptopp/misc.cpp
|
||||||
|
cryptopp/modes.cpp
|
||||||
|
cryptopp/mqueue.cpp
|
||||||
|
cryptopp/nbtheory.cpp
|
||||||
|
cryptopp/oaep.cpp
|
||||||
|
cryptopp/osrng.cpp
|
||||||
|
cryptopp/pubkey.cpp
|
||||||
|
cryptopp/queue.cpp
|
||||||
|
cryptopp/randpool.cpp
|
||||||
|
cryptopp/rdtables.cpp
|
||||||
|
cryptopp/rijndael.cpp
|
||||||
|
cryptopp/rng.cpp
|
||||||
|
cryptopp/sha.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(MINGW OR WIN32)
|
|
||||||
list(APPEND cryptopp_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/winpipes.cpp)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(MSVC AND NOT CRYPTOPP_DISABLE_ASM)
|
if(MSVC AND NOT CRYPTOPP_DISABLE_ASM)
|
||||||
if(${CMAKE_GENERATOR} MATCHES ".*ARM")
|
if(${CMAKE_GENERATOR} MATCHES ".*ARM")
|
||||||
message(STATUS "Disabling ASM because ARM is specified as target platform.")
|
message(STATUS "Disabling ASM because ARM is specified as target platform.")
|
||||||
|
@ -160,9 +184,5 @@ target_include_directories(cryptopp INTERFACE .)
|
||||||
# Third-party libraries
|
# Third-party libraries
|
||||||
#============================================================================
|
#============================================================================
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
target_link_libraries(cryptopp PRIVATE ws2_32)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
target_link_libraries(cryptopp PRIVATE ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(cryptopp PRIVATE ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
Reference in New Issue