From c2d1ac9f25a3b5762e4b2f198211e3dc467e63e5 Mon Sep 17 00:00:00 2001 From: dsc Date: Mon, 25 Mar 2024 15:21:07 +0200 Subject: [PATCH] wat --- cmake/functions.cmake | 42 +++++++++---- contrib/epee/src/CMakeLists.txt | 13 ++-- external/CMakeLists.txt | 5 +- external/db_drivers/liblmdb/CMakeLists.txt | 5 +- external/easylogging++/CMakeLists.txt | 14 +++-- external/qrcodegen/CMakeLists.txt | 10 ++- src/CMakeLists.txt | 15 ++--- src/blockchain_db/CMakeLists.txt | 21 ++++--- src/blocks/CMakeLists.txt | 10 ++- src/checkpoints/CMakeLists.txt | 10 ++- src/common/CMakeLists.txt | 46 +++++++++++--- src/crypto/CMakeLists.txt | 39 +++++++++--- src/crypto/wallet/CMakeLists.txt | 12 ++-- src/cryptonote_basic/CMakeLists.txt | 33 +++++++--- src/cryptonote_core/CMakeLists.txt | 23 ++++--- src/cryptonote_protocol/CMakeLists.txt | 19 +++--- src/daemonizer/CMakeLists.txt | 3 +- src/device/CMakeLists.txt | 21 ++++--- src/hardforks/CMakeLists.txt | 9 +-- src/lmdb/CMakeLists.txt | 20 +++--- src/mnemonics/CMakeLists.txt | 28 ++++++--- src/multisig/CMakeLists.txt | 23 +++---- src/net/CMakeLists.txt | 23 ++++--- src/p2p/CMakeLists.txt | 17 ++--- src/ringct/CMakeLists.txt | 21 +++---- src/rpc/CMakeLists.txt | 59 +++++++++--------- src/serialization/CMakeLists.txt | 27 +++++--- src/wallet/CMakeLists.txt | 11 ++-- src/wallet/api/CMakeLists.txt | 72 +++++++++++----------- 29 files changed, 394 insertions(+), 257 deletions(-) diff --git a/cmake/functions.cmake b/cmake/functions.cmake index 09ede1af8..792039946 100644 --- a/cmake/functions.cmake +++ b/cmake/functions.cmake @@ -1,24 +1,32 @@ include(GNUInstallDirs) include(CMakePackageConfigHelpers) -#function(monero_register_lib LIB) -# set_property(GLOBAL PROPERTY source_list_property "${source_list}") -#endfunction() +function(monero_install_library targetName) + set(flags) + set(args) + set(listArgs INCLUDE_DIR HEADERS) + cmake_parse_arguments(arg "${flags}" "${args}" "${listArgs}" ${ARGN}) -function(monero_install_library LIB) - set(HEADER_DESTINATION "${ARGN}") + set(include_dir "${arg_INCLUDE_DIR}") + set(headers "${arg_HEADERS}") - set(path_install ${CMAKE_INSTALL_LIBDIR}/cmake/monero) - if(NOT HEADER_DESTINATION) - set(HEADER_DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/monero/") + if(NOT include_dir) + set(include_dir "${CMAKE_INSTALL_INCLUDEDIR}/monero/") endif() - install(TARGETS ${LIB} EXPORT MoneroTargets + if(${targetName} STREQUAL "device") + message(STATUS "lol") + endif() + + if(headers AND include_dir) + install_with_directory(DESTINATION ${include_dir} FILES ${headers}) + endif() + + install(TARGETS ${targetName} EXPORT MoneroTargets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}/monero/ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/monero/ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/monero/) -# FILE_SET HEADERS DESTINATION ${HEADER_DESTINATION}) endfunction() function(print_cmake_summary) @@ -72,4 +80,16 @@ function(print_cmake_summary) message(STATUS " - dirs: ${Iconv_INCLUDE_DIRS}") endif() -endfunction() \ No newline at end of file +endfunction() + +macro(install_with_directory) + set(optionsArgs "") + set(oneValueArgs "DESTINATION") + set(multiValueArgs "FILES") + cmake_parse_arguments(CAS "${optionsArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) + + foreach(FILE ${CAS_FILES}) + get_filename_component(DIR ${FILE} DIRECTORY) + INSTALL(FILES ${FILE} DESTINATION ${CAS_DESTINATION}/${DIR}) + endforeach() +endmacro(install_with_directory) \ No newline at end of file diff --git a/contrib/epee/src/CMakeLists.txt b/contrib/epee/src/CMakeLists.txt index 23b6002e6..09b85b30d 100644 --- a/contrib/epee/src/CMakeLists.txt +++ b/contrib/epee/src/CMakeLists.txt @@ -36,11 +36,6 @@ file(GLOB EPEE_SOURCES add_library(epee) target_sources(epee - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/ - FILES - ${EPEE_HEADERS_PUBLIC} PRIVATE ${EPEE_SOURCES} ) @@ -59,6 +54,10 @@ target_link_libraries(epee target_include_directories(epee PUBLIC $ - PUBLIC $) + PUBLIC $ + PUBLIC $) -monero_install_library(epee "${CMAKE_INSTALL_INCLUDEDIR}/monero/epee/") \ No newline at end of file +install(DIRECTORY ${EPEE_INCLUDE_DIR_BASE}/ + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/monero/epee/") + +monero_install_library(epee) \ No newline at end of file diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index d61049aec..600c4b461 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -32,4 +32,7 @@ add_subdirectory(db_drivers) add_subdirectory(easylogging++) add_subdirectory(qrcodegen) add_subdirectory(randomwow) -add_subdirectory(supercop) \ No newline at end of file +add_subdirectory(supercop) + +install(DIRECTORY boost + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/monero/") \ No newline at end of file diff --git a/external/db_drivers/liblmdb/CMakeLists.txt b/external/db_drivers/liblmdb/CMakeLists.txt index 71cbb17a7..ab84e2d78 100644 --- a/external/db_drivers/liblmdb/CMakeLists.txt +++ b/external/db_drivers/liblmdb/CMakeLists.txt @@ -37,6 +37,7 @@ target_sources(lmdb PRIVATE ${lmdb_sources}) target_include_directories(lmdb PUBLIC $ PUBLIC $ + PUBLIC $ ) target_link_libraries(lmdb PRIVATE Threads::Threads) @@ -59,4 +60,6 @@ set_target_properties(lmdb PROPERTIES CXX_STANDARD_REQUIRED ON ) -monero_install_library(lmdb) +monero_install_library(lmdb + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/lmdb/" + HEADERS "midl.h;lmdb.h") \ No newline at end of file diff --git a/external/easylogging++/CMakeLists.txt b/external/easylogging++/CMakeLists.txt index fa108ee72..2ccf1d5b8 100644 --- a/external/easylogging++/CMakeLists.txt +++ b/external/easylogging++/CMakeLists.txt @@ -26,13 +26,12 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +set(EL_HEADERS + easylogging++.h + ea_config.h) + add_library(easylogging) target_sources(easylogging - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/easylogging++.h PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/easylogging++.cc ) @@ -44,6 +43,7 @@ target_compile_definitions(easylogging PUBLIC target_include_directories(easylogging PUBLIC $ PUBLIC $ + PUBLIC $ ) target_link_libraries(easylogging @@ -51,4 +51,6 @@ target_link_libraries(easylogging Threads::Threads ${Backtrace_LIBRARIES}) -monero_install_library(easylogging) +monero_install_library(easylogging + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/easylogging++/" + HEADERS ${EL_HEADERS}) diff --git a/external/qrcodegen/CMakeLists.txt b/external/qrcodegen/CMakeLists.txt index 98b164b14..ad8f8156e 100644 --- a/external/qrcodegen/CMakeLists.txt +++ b/external/qrcodegen/CMakeLists.txt @@ -1,11 +1,6 @@ add_library(qrcodegen) target_sources(qrcodegen - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/QrCode.hpp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/QrCode.cpp ) @@ -13,6 +8,9 @@ target_sources(qrcodegen target_include_directories(qrcodegen PUBLIC $ PUBLIC $ + PUBLIC $ ) -monero_install_library(qrcodegen) +monero_install_library(qrcodegen + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/qrcodegen/" + HEADERS QrCode.hpp) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3efd8128f..006255233 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -31,11 +31,6 @@ include(Version) add_library(version) target_sources(version - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/version.h PRIVATE ${CMAKE_BINARY_DIR}/version.cpp ) @@ -44,9 +39,12 @@ target_include_directories(version PUBLIC $ PUBLIC $ PUBLIC $ + PUBLIC $ ) -monero_install_library(version) +monero_install_library(version + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/" + HEADERS version.h) add_subdirectory(common) add_subdirectory(crypto) @@ -80,4 +78,7 @@ if(PER_BLOCK_CHECKPOINT) add_subdirectory(blocks) endif() -add_subdirectory(device) \ No newline at end of file +add_subdirectory(device) + +install(FILES cryptonote_config.h + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/monero/") \ No newline at end of file diff --git a/src/blockchain_db/CMakeLists.txt b/src/blockchain_db/CMakeLists.txt index ccc3ce7a8..8dcd0711c 100644 --- a/src/blockchain_db/CMakeLists.txt +++ b/src/blockchain_db/CMakeLists.txt @@ -26,19 +26,19 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -file(GLOB BCDB_HEADERS *.h) file(GLOB BCDB_SOURCES *.cpp *.c *.cc) - list(APPEND BCDB_SOURCES lmdb/db_lmdb.cpp) -list(APPEND BCDB_HEADERS lmdb/db_lmdb.h) + +set(BCDB_HEADERS + blockchain_db.h + locked_txn.h + testdb.h + lmdb/db_lmdb.h) + +message(STATUS "${BCDB_HEADERS}") add_library(blockchain_db) target_sources(blockchain_db - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../ - FILES - ${BCDB_HEADERS} PRIVATE ${BCDB_SOURCES} ) @@ -55,6 +55,9 @@ target_include_directories(blockchain_db PUBLIC $ PUBLIC $ PUBLIC $ + PUBLIC $ ) -monero_install_library(blockchain_db "${CMAKE_INSTALL_INCLUDEDIR}/monero/blockchain_db/") +monero_install_library(blockchain_db + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/blockchain_db/" + HEADERS ${BCDB_HEADERS}) \ No newline at end of file diff --git a/src/blocks/CMakeLists.txt b/src/blocks/CMakeLists.txt index 5e8cdaee3..38f7a8bc1 100644 --- a/src/blocks/CMakeLists.txt +++ b/src/blocks/CMakeLists.txt @@ -59,11 +59,6 @@ endforeach() add_library(blocks) target_sources(blocks - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/blocks.h PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/blocks.cpp ${GENERATED_SOURCES} @@ -73,6 +68,9 @@ target_include_directories(blocks PUBLIC $ PUBLIC $ PUBLIC $ + PUBLIC $ ) -monero_install_library(blocks "${CMAKE_INSTALL_INCLUDEDIR}/monero/blocks/") \ No newline at end of file +monero_install_library(blocks + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/blocks/" + HEADERS blocks.h) \ No newline at end of file diff --git a/src/checkpoints/CMakeLists.txt b/src/checkpoints/CMakeLists.txt index 345f06fee..58c9891b0 100644 --- a/src/checkpoints/CMakeLists.txt +++ b/src/checkpoints/CMakeLists.txt @@ -28,11 +28,6 @@ add_library(checkpoints) target_sources(checkpoints - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/checkpoints.h PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/checkpoints.cpp ) @@ -50,6 +45,9 @@ target_link_libraries(checkpoints PUBLIC target_include_directories(checkpoints PUBLIC $ PUBLIC $ + PUBLIC $ ) -monero_install_library(checkpoints "${CMAKE_INSTALL_INCLUDEDIR}/monero/checkpoints/") \ No newline at end of file +monero_install_library(checkpoints + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/checkpoints/" + HEADERS checkpoints.h) \ No newline at end of file diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 27ae24509..a01572a26 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -27,16 +27,43 @@ # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. file(GLOB COMMON_SOURCES "*.cpp" "*.c") -file(GLOB COMMON_HEADERS "*.h") +set(COMMON_HEADERS + aligned.h + apply_permutation.h + base58.h + boost_serialization_helper.h + combinator.h + command_line.h + common_fwd.h + data_cache.h + dns_utils.h + download.h + error.h + expect.h + http_connection.h + i18n.h + json_util.h + notify.h + password.h + perf_timer.h + pod-class.h + powerof.h + pruning.h + rpc_client.h + scoped_message_writer.h + sfinae_helpers.h + spawn.h + stack_trace.h + threadpool.h + timings.h + unordered_containers_boost_serialization.h + updates.h + utf8.h + util.h + varint.h) add_library(common) - target_sources(common - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${COMMON_HEADERS} PRIVATE ${COMMON_SOURCES} ) @@ -61,6 +88,7 @@ target_include_directories(common PUBLIC $ PRIVATE $ PUBLIC $ + PUBLIC $ ) if(STATIC) @@ -69,4 +97,6 @@ endif() add_dependencies(common generate_translations_header) -monero_install_library(common "${CMAKE_INSTALL_INCLUDEDIR}/monero/common/") \ No newline at end of file +monero_install_library(common + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/common/" + HEADERS ${COMMON_HEADERS}) \ No newline at end of file diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt index a98ee2950..87a01a07a 100644 --- a/src/crypto/CMakeLists.txt +++ b/src/crypto/CMakeLists.txt @@ -49,7 +49,34 @@ set(crypto_sources rx-slow-hash.c CryptonightR_JIT.c tree-hash.c) -file(GLOB crypto_headers "*.h") + +set(crypto_headers + CryptonightR_JIT.h + CryptonightR_template.h + blake256.h + c_threads.h + chacha.h + crypto-ops.h + crypto.h + duration.h + generic-ops.h + groestl.h + groestl_tables.h + hash-ops.h + hash.h + hmac-keccak.h + initializer.h + jh.h + keccak.h + oaes_config.h + oaes_lib.h + random.h + skein.h + skein_port.h + variant2_int_sqrt.h + variant4_random_math.h) + +message(STATUS "${crypto_headers}") if(NOT ARM) list(APPEND crypto_sources CryptonightR_template.S) @@ -57,11 +84,6 @@ endif() add_library(cncrypto) target_sources(cncrypto - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${crypto_headers} PRIVATE ${crypto_sources} ) @@ -79,6 +101,7 @@ target_link_libraries(cncrypto target_include_directories(cncrypto PUBLIC $ PUBLIC $ + PUBLIC $ PUBLIC ${sodium_INCLUDE_DIR} ) @@ -102,4 +125,6 @@ set_property(SOURCE CryptonightR_template.S PROPERTY XCODE_EXPLICIT_FILE_TYPE so # Must be done last, because it references libraries in this directory add_subdirectory(wallet) -monero_install_library(cncrypto "${CMAKE_INSTALL_INCLUDEDIR}/monero/crypto/") \ No newline at end of file +monero_install_library(cncrypto + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/crypto/" + HEADERS ${crypto_headers}) \ No newline at end of file diff --git a/src/crypto/wallet/CMakeLists.txt b/src/crypto/wallet/CMakeLists.txt index bd746e924..db0afee79 100644 --- a/src/crypto/wallet/CMakeLists.txt +++ b/src/crypto/wallet/CMakeLists.txt @@ -31,13 +31,6 @@ include(CheckLanguage) check_language(ASM-ATT) add_library(wallet-crypto crypto.h) -target_sources(wallet-crypto - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/crypto.h - ) target_include_directories(wallet-crypto PUBLIC $ @@ -46,4 +39,7 @@ target_include_directories(wallet-crypto ) target_link_libraries(wallet-crypto PUBLIC cncrypto) -monero_install_library(wallet-crypto "${CMAKE_INSTALL_INCLUDEDIR}/monero/wallet-crypto/") + +monero_install_library(wallet-crypto + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/wallet-crypto/" + HEADERS crypto.h) \ No newline at end of file diff --git a/src/cryptonote_basic/CMakeLists.txt b/src/cryptonote_basic/CMakeLists.txt index 6ab987bf7..4f79fafbd 100644 --- a/src/cryptonote_basic/CMakeLists.txt +++ b/src/cryptonote_basic/CMakeLists.txt @@ -26,8 +26,25 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -file(GLOB CN_BASIC_HEADERS *.h) file(GLOB CN_BASIC_SOURCES *.cpp *.c *.cc) +set(CN_BASIC_HEADERS + account.h + account_boost_serialization.h + blobdatatype.h + connection_context.h + cryptonote_basic.h + cryptonote_basic_impl.h + cryptonote_boost_serialization.h + cryptonote_format_utils.h + difficulty.h + events.h + fwd.h + hardfork.h + merge_mining.h + miner.h + subaddress_index.h + tx_extra.h + verification_context.h) # cryptonote_format_utils_basic add_library(cryptonote_format_utils_basic) @@ -40,16 +57,12 @@ target_link_libraries(cryptonote_format_utils_basic PUBLIC cncrypto) target_include_directories(cryptonote_format_utils_basic PUBLIC $ PUBLIC $ + PUBLIC $ ) # cryptonote_basic add_library(cryptonote_basic) target_sources(cryptonote_basic - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../ - FILES - ${CN_BASIC_HEADERS} PRIVATE ${CN_BASIC_SOURCES} ) @@ -70,7 +83,11 @@ target_link_libraries(cryptonote_basic target_include_directories(cryptonote_basic PUBLIC $ PUBLIC $ + PUBLIC $ + PUBLIC $ ) -monero_install_library(cryptonote_format_utils_basic "${CMAKE_INSTALL_INCLUDEDIR}/monero/cryptonote_basic/") -monero_install_library(cryptonote_basic "${CMAKE_INSTALL_INCLUDEDIR}/monero/cryptonote_basic/") \ No newline at end of file +monero_install_library(cryptonote_format_utils_basic) +monero_install_library(cryptonote_basic + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/cryptonote_basic/" + HEADERS ${CN_BASIC_HEADERS}) \ No newline at end of file diff --git a/src/cryptonote_core/CMakeLists.txt b/src/cryptonote_core/CMakeLists.txt index 74ad2d0ac..947db67a9 100644 --- a/src/cryptonote_core/CMakeLists.txt +++ b/src/cryptonote_core/CMakeLists.txt @@ -26,10 +26,18 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -file(GLOB CN_CORE_HEADERS *.h) file(GLOB CN_CORE_SOURCES *.cpp *.c *.cc) +set(CN_CORE_HEADERS + blockchain.h + blockchain_storage_boost_serialization.h + cryptonote_core.h + cryptonote_tx_utils.h + i_core_events.h + tx_pool.h + tx_sanity_check.h + tx_verification_utils.h) -add_library(cryptonote_core ${CN_CORE_SOURCES}) +add_library(cryptonote_core) target_link_libraries(cryptonote_core PUBLIC version @@ -49,6 +57,7 @@ target_link_libraries(cryptonote_core target_include_directories(cryptonote_core PRIVATE PUBLIC $ PUBLIC $ + PUBLIC $ ) if(PER_BLOCK_CHECKPOINT) @@ -56,11 +65,6 @@ if(PER_BLOCK_CHECKPOINT) endif() target_sources(cryptonote_core - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../ - FILES - ${CN_CORE_HEADERS} PRIVATE ${CN_CORE_SOURCES} ) @@ -68,6 +72,9 @@ target_sources(cryptonote_core target_include_directories(cryptonote_core PUBLIC $ PUBLIC $ + PUBLIC $ ) -monero_install_library(cryptonote_core "${CMAKE_INSTALL_INCLUDEDIR}/monero/cryptonote_core/") +monero_install_library(cryptonote_core + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/cryptonote_core/" + HEADERS ${CN_CORE_HEADERS}) \ No newline at end of file diff --git a/src/cryptonote_protocol/CMakeLists.txt b/src/cryptonote_protocol/CMakeLists.txt index 934d289b3..0f622b1e8 100644 --- a/src/cryptonote_protocol/CMakeLists.txt +++ b/src/cryptonote_protocol/CMakeLists.txt @@ -26,16 +26,18 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -file(GLOB CN_PROT_HEADERS *.h) file(GLOB CN_PROT_SOURCES *.cpp *.c *.cc) +set(CN_PROT_HEADERS + block_queue.h + cryptonote_protocol_defs.h + cryptonote_protocol_handler.h + cryptonote_protocol_handler_common.h + enums.h + fwd.h + levin_notify.h) add_library(cryptonote_protocol) target_sources(cryptonote_protocol - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${CN_PROT_HEADERS} PRIVATE ${CN_PROT_SOURCES} ) @@ -45,7 +47,10 @@ target_link_libraries(cryptonote_protocol PUBLIC p2p) target_include_directories(cryptonote_protocol PUBLIC $ PUBLIC $ + PUBLIC $ PRIVATE ${OPENSSL_INCLUDE_DIR} ) -monero_install_library(cryptonote_protocol "${CMAKE_INSTALL_INCLUDEDIR}/monero/cryptonote_protocol/") \ No newline at end of file +monero_install_library(cryptonote_protocol + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/cryptonote_protocol/" + HEADERS ${CN_PROT_HEADERS}) \ No newline at end of file diff --git a/src/daemonizer/CMakeLists.txt b/src/daemonizer/CMakeLists.txt index ba7a9278d..8f5bd4218 100644 --- a/src/daemonizer/CMakeLists.txt +++ b/src/daemonizer/CMakeLists.txt @@ -70,5 +70,4 @@ target_link_libraries(daemonizer Boost::filesystem Boost::program_options) -target_include_directories(daemonizer PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/../) \ No newline at end of file +target_include_directories(daemonizer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../) \ No newline at end of file diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt index 6840b05a8..92f2fbbfa 100644 --- a/src/device/CMakeLists.txt +++ b/src/device/CMakeLists.txt @@ -26,17 +26,15 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +set(HEADERS + device.hpp + device_io.hpp + device_default.hpp + device_cold.hpp + log.hpp) + add_library(device) target_sources(device - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../ - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/device.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/device_io.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/device_default.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/device_cold.hpp - ${CMAKE_CURRENT_SOURCE_DIR}/log.hpp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/device.cpp ${CMAKE_CURRENT_SOURCE_DIR}/device_default.cpp @@ -60,6 +58,9 @@ target_include_directories(device PUBLIC $ PUBLIC $ PUBLIC $ + PUBLIC $ ) -monero_install_library(device "${CMAKE_INSTALL_INCLUDEDIR}/monero/device/") \ No newline at end of file +monero_install_library(device + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/device/" + HEADERS "${HEADERS}") diff --git a/src/hardforks/CMakeLists.txt b/src/hardforks/CMakeLists.txt index d6aeb064b..980cd34b7 100644 --- a/src/hardforks/CMakeLists.txt +++ b/src/hardforks/CMakeLists.txt @@ -28,15 +28,12 @@ add_library(hardforks) target_sources(hardforks - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/hardforks.h PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/hardforks.cpp ) target_link_libraries(hardforks PUBLIC version) -monero_install_library(hardforks "${CMAKE_INSTALL_INCLUDEDIR}/monero/hardforks/") +monero_install_library(hardforks + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/hardforks/" + HEADERS hardforks.h) \ No newline at end of file diff --git a/src/lmdb/CMakeLists.txt b/src/lmdb/CMakeLists.txt index b3ca25d4f..a48ea658a 100644 --- a/src/lmdb/CMakeLists.txt +++ b/src/lmdb/CMakeLists.txt @@ -26,16 +26,18 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -file(GLOB LMDB_HEADERS *.h) file(GLOB LMDB_SOURCES *.cpp *.c *.cc) +set(LMDB_HEADERS + database.h + error.h + key_stream.h + table.h + transaction.h + util.h + value_stream.h) -add_library(lmdb_lib ${LMDB_SOURCES}) +add_library(lmdb_lib) target_sources(lmdb_lib - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${LMDB_HEADERS} PRIVATE ${LMDB_SOURCES} ) @@ -44,4 +46,6 @@ target_link_libraries(lmdb_lib PRIVATE common lmdb) -monero_install_library(lmdb_lib "${CMAKE_INSTALL_INCLUDEDIR}/monero/lmdb/") \ No newline at end of file +monero_install_library(lmdb_lib + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/lmdb_lib/" + HEADERS ${LMDB_HEADERS}) \ No newline at end of file diff --git a/src/mnemonics/CMakeLists.txt b/src/mnemonics/CMakeLists.txt index 0d9b8f098..100dc4a5a 100644 --- a/src/mnemonics/CMakeLists.txt +++ b/src/mnemonics/CMakeLists.txt @@ -26,16 +26,27 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -file(GLOB MN_HEADERS *.h) file(GLOB MN_SOURCES *.cpp *.c *.cc) +set(MN_HEADERS + chinese_simplified.h + dutch.h + electrum-words.h + english.h + english_old.h + esperanto.h + french.h + german.h + italian.h + japanese.h + language_base.h + lojban.h + portuguese.h + russian.h + singleton.h + spanish.h) add_library(mnemonics) target_sources(mnemonics - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${MN_HEADERS} PRIVATE ${MN_SOURCES} ) @@ -49,6 +60,9 @@ target_link_libraries(mnemonics target_include_directories(mnemonics PUBLIC $ PUBLIC $ + PUBLIC $ ) -monero_install_library(mnemonics "${CMAKE_INSTALL_INCLUDEDIR}/monero/mnemonics/") \ No newline at end of file +monero_install_library(mnemonics + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/mnemonics/" + HEADERS ${MN_HEADERS}) \ No newline at end of file diff --git a/src/multisig/CMakeLists.txt b/src/multisig/CMakeLists.txt index eeb2172aa..982388e7c 100644 --- a/src/multisig/CMakeLists.txt +++ b/src/multisig/CMakeLists.txt @@ -25,19 +25,17 @@ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -file(GLOB MULTISIG_HEADERS *.h) -file(GLOB MULTISIG_SOURCES - *.cpp - *.c - *.cc) +file(GLOB MULTISIG_SOURCES *.cpp *.c *.cc) +set(MULTISIG_HEADERS + multisig_account.h + multisig_clsag_context.h + multisig.h + multisig_kex_msg.h + multisig_kex_msg_serialization.h + multisig_tx_builder_ringct.h) add_library(multisig) target_sources(multisig - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${MULTISIG_HEADERS} PRIVATE ${MULTISIG_SOURCES} ) @@ -53,6 +51,9 @@ target_link_libraries(multisig target_include_directories(multisig PUBLIC $ PUBLIC $ + PUBLIC $ ) -monero_install_library(multisig "${CMAKE_INSTALL_INCLUDEDIR}/monero/multisig/") +monero_install_library(multisig + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/multisig/" + HEADERS ${MULTISIG_HEADERS}) diff --git a/src/net/CMakeLists.txt b/src/net/CMakeLists.txt index e446bb88c..386ae36b0 100644 --- a/src/net/CMakeLists.txt +++ b/src/net/CMakeLists.txt @@ -27,16 +27,22 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -file(GLOB NET_HEADERS *.h) +SET(NET_HEADERS + dandelionpp.h + error.h + fwd.h + http.h + i2p_address.h + parse.h + resolve.h + socks_connect.h + socks.h + tor_address.h + zmq.h) file(GLOB NET_SOURCES *.cpp *.c *.cc) add_library(net) target_sources(net - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../ - FILES - ${NET_HEADERS} PRIVATE ${NET_SOURCES} ) @@ -50,8 +56,11 @@ target_link_libraries(net PUBLIC target_include_directories(net PUBLIC $ PUBLIC $ + PUBLIC $ PRIVATE ${ZMQ_INCLUDE_DIRS} PRIVATE ${OPENSSL_INCLUDE_DIR} ) -monero_install_library(net "${CMAKE_INSTALL_INCLUDEDIR}/monero/net/") \ No newline at end of file +monero_install_library(net + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/net/" + HEADERS ${NET_HEADERS}) diff --git a/src/p2p/CMakeLists.txt b/src/p2p/CMakeLists.txt index ef571e40d..453e288dc 100644 --- a/src/p2p/CMakeLists.txt +++ b/src/p2p/CMakeLists.txt @@ -26,16 +26,16 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -file(GLOB P2P_HEADERS *.h) file(GLOB P2P_SOURCES *.cpp *.c *.cc) +set(P2P_HEADERS + net_node_common.h + net_node.h + net_peerlist_boost_serialization.h + net_peerlist.h + p2p_protocol_defs.h) add_library(p2p) target_sources(p2p - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${P2P_HEADERS} PRIVATE ${P2P_SOURCES} ) @@ -57,7 +57,10 @@ target_include_directories(p2p PUBLIC $ PUBLIC $ PUBLIC $ + PUBLIC $ PRIVATE ${OPENSSL_INCLUDE_DIR} ) -monero_install_library(p2p "${CMAKE_INSTALL_INCLUDEDIR}/monero/p2p/") \ No newline at end of file +monero_install_library(p2p + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/p2p/" + HEADERS ${P2P_HEADERS}) diff --git a/src/ringct/CMakeLists.txt b/src/ringct/CMakeLists.txt index e7c19f3ff..f96086da8 100644 --- a/src/ringct/CMakeLists.txt +++ b/src/ringct/CMakeLists.txt @@ -46,11 +46,6 @@ set(ringct_basic_headers add_library(ringct_basic) target_sources(ringct_basic - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${ringct_basic_headers} PRIVATE ${ringct_basic_sources} ) @@ -66,16 +61,12 @@ target_link_libraries(ringct_basic target_include_directories(ringct_basic PUBLIC $ PUBLIC $ + PUBLIC $ PRIVATE ${OPENSSL_INCLUDE_DIR} ) add_library(ringct) target_sources(ringct - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rctSigs.h PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/rctSigs.cpp ) @@ -92,8 +83,14 @@ target_link_libraries(ringct target_include_directories(ringct PUBLIC $ PUBLIC $ + PUBLIC $ PRIVATE ${OPENSSL_INCLUDE_DIR} ) -monero_install_library(ringct_basic "${CMAKE_INSTALL_INCLUDEDIR}/monero/ringct/") -monero_install_library(ringct "${CMAKE_INSTALL_INCLUDEDIR}/monero/ringct/") +monero_install_library(ringct_basic + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/ringct/" + HEADERS ${ringct_basic_headers}) + +monero_install_library(ringct + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/ringct/" + HEADERS rctSigs.h) diff --git a/src/rpc/CMakeLists.txt b/src/rpc/CMakeLists.txt index 620f3b45e..f08e8e1fd 100644 --- a/src/rpc/CMakeLists.txt +++ b/src/rpc/CMakeLists.txt @@ -27,16 +27,13 @@ # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # rpc base +set(RPC_BASE_HEADERS + rpc_args.h + rpc_payment_signature.h + rpc_handler.h) add_library(rpc_base) target_sources(rpc_base - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rpc_args.h - ${CMAKE_CURRENT_SOURCE_DIR}/rpc_payment_signature.h - ${CMAKE_CURRENT_SOURCE_DIR}/rpc_handler.h PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/rpc_args.cpp ${CMAKE_CURRENT_SOURCE_DIR}/rpc_payment_signature.cpp @@ -58,23 +55,22 @@ target_include_directories(rpc_base PRIVATE ${OPENSSL_INCLUDE_DIR} ) -monero_install_library(rpc_base "${CMAKE_INSTALL_INCLUDEDIR}/monero/rpc/") +monero_install_library(rpc_base + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/rpc_base/" + HEADERS "${RPC_BASE_HEADERS}") # rpc +set(RPC_HEADERS + rpc_version_str.h + rpc_handler.h + bootstrap_daemon.h + core_rpc_server.h + rpc_payment.h + core_rpc_server_commands_defs.h + core_rpc_server_error_codes.h) add_library(rpc) target_sources(rpc - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/rpc_version_str.h - ${CMAKE_CURRENT_SOURCE_DIR}/rpc_handler.h - ${CMAKE_CURRENT_SOURCE_DIR}/bootstrap_daemon.h - ${CMAKE_CURRENT_SOURCE_DIR}/core_rpc_server.h - ${CMAKE_CURRENT_SOURCE_DIR}/rpc_payment.h - ${CMAKE_CURRENT_SOURCE_DIR}/core_rpc_server_commands_defs.h - ${CMAKE_CURRENT_SOURCE_DIR}/core_rpc_server_error_codes.h PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/bootstrap_daemon.cpp ${CMAKE_CURRENT_SOURCE_DIR}/bootstrap_node_selector.cpp @@ -84,7 +80,6 @@ target_sources(rpc ${CMAKE_CURRENT_SOURCE_DIR}/instanciations.cpp ) - target_link_libraries(rpc PUBLIC rpc_base @@ -99,21 +94,21 @@ target_link_libraries(rpc target_include_directories(rpc PUBLIC $ PUBLIC $ + PUBLIC $ PRIVATE ${ZMQ_INCLUDE_DIRS} PRIVATE ${OPENSSL_INCLUDE_DIR} ) -monero_install_library(rpc "${CMAKE_INSTALL_INCLUDEDIR}/monero/rpc/") +monero_install_library(rpc + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/rpc/" + HEADERS "${RPC_HEADERS}") # rpc pub +set(RPC_PUB_HEADERS + zmq_pub.h) add_library(rpc_pub) target_sources(rpc_pub - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/zmq_pub.h PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/zmq_pub.cpp ) @@ -129,19 +124,23 @@ target_link_libraries(rpc_pub target_include_directories(rpc_pub PUBLIC $ PUBLIC $ + PUBLIC $ PRIVATE ${ZMQ_INCLUDE_DIRS} PRIVATE ${OPENSSL_INCLUDE_DIR} ) -monero_install_library(rpc_pub "${CMAKE_INSTALL_INCLUDEDIR}/monero/rpc/") +monero_install_library(rpc_pub + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/rpc_pub/" + HEADERS "${RPC_PUB_HEADERS}") # daemon messages +set(DAEMON_MESSAGES_HEADERS + message.h + daemon_messages.h) add_library(daemon_messages message.cpp - daemon_messages.cpp - message.h - daemon_messages.h) + daemon_messages.cpp) target_link_libraries(daemon_messages LINK_PRIVATE diff --git a/src/serialization/CMakeLists.txt b/src/serialization/CMakeLists.txt index d133f593e..d49814e7d 100644 --- a/src/serialization/CMakeLists.txt +++ b/src/serialization/CMakeLists.txt @@ -26,16 +26,26 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -file(GLOB SER_HEADERS *.h) file(GLOB SER_SOURCES *.cpp *.c *.cc) +set(SER_HEADERS + binary_archive.h + binary_utils.h + container.h + containers.h + crypto.h + debug_archive.h + difficulty_type.h + json_archive.h + json_object.h + json_utils.h + pair.h + serialization.h + string.h + tuple.h + variant.h) add_library(serialization) target_sources(serialization - PUBLIC - FILE_SET HEADERS - BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../ - FILES - ${SER_HEADERS} PRIVATE ${SER_SOURCES} ) @@ -56,6 +66,9 @@ add_dependencies(serialization version) target_include_directories(serialization PUBLIC $ PUBLIC $ + PUBLIC $ ) -monero_install_library(serialization "${CMAKE_INSTALL_INCLUDEDIR}/monero/serialization/") \ No newline at end of file +monero_install_library(serialization + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/serialization/" + HEADERS "${SER_HEADERS}") diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt index 9d2d28633..60f113491 100644 --- a/src/wallet/CMakeLists.txt +++ b/src/wallet/CMakeLists.txt @@ -40,9 +40,7 @@ set(wallet_headers api/pending_transaction_info.h api/wallet.h api/wallet2_api.h - wallet2.h) - -set(wallet_private_headers + wallet2.h api/address_book.h api/coins.h api/coins_info.h @@ -68,11 +66,8 @@ set(wallet_private_headers add_library(wallet ${wallet_sources}) target_sources(wallet - PUBLIC - ${wallet_headers} PRIVATE ${wallet_sources} - ${wallet_private_headers} ) target_link_libraries(wallet @@ -100,7 +95,9 @@ target_include_directories(wallet PRIVATE ${OPENSSL_INCLUDE_DIR} ) -monero_install_library(wallet "${CMAKE_INSTALL_INCLUDEDIR}/monero/wallet/") +monero_install_library(wallet + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/wallet/" + HEADERS "${wallet_headers}") # == rpc server diff --git a/src/wallet/api/CMakeLists.txt b/src/wallet/api/CMakeLists.txt index 3a19cca38..8b3b506db 100644 --- a/src/wallet/api/CMakeLists.txt +++ b/src/wallet/api/CMakeLists.txt @@ -26,43 +26,41 @@ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# include (${PROJECT_SOURCE_DIR}/cmake/libutils.cmake) - set(wallet_api_sources - wallet.cpp - wallet_manager.cpp - transaction_info.cpp - transaction_history.cpp - transaction_construction_info.cpp - pending_transaction_info.cpp - pending_transaction.cpp - utils.cpp - address_book.cpp - subaddress.cpp - subaddress_account.cpp - unsigned_transaction.cpp - coins.cpp - coins_info.cpp) + wallet.cpp + wallet_manager.cpp + transaction_info.cpp + transaction_history.cpp + transaction_construction_info.cpp + pending_transaction_info.cpp + pending_transaction.cpp + utils.cpp + address_book.cpp + subaddress.cpp + subaddress_account.cpp + unsigned_transaction.cpp + coins.cpp + coins_info.cpp) set(wallet_api_headers wallet2_api.h) set(wallet_api_private_headers - wallet.h - wallet_manager.h - transaction_info.h - transaction_history.h - transaction_construction_info.h - pending_transaction_info.h - pending_transaction.h - common_defines.h - address_book.h - subaddress.h - subaddress_account.h - unsigned_transaction.h - coins.h - coins_info.h) + wallet.h + wallet_manager.h + transaction_info.h + transaction_history.h + transaction_construction_info.h + pending_transaction_info.h + pending_transaction.h + common_defines.h + address_book.h + subaddress.h + subaddress_account.h + unsigned_transaction.h + coins.h + coins_info.h) -add_library(wallet_api) +add_library(wallet_api ${wallet_api_sources}) target_link_libraries(wallet_api PUBLIC @@ -82,13 +80,13 @@ target_link_libraries(wallet_api ${ICU_LIBRARIES}) target_include_directories(wallet_api - PRIVATE ${OPENSSL_INCLUDE_DIR}) + PRIVATE ${OPENSSL_INCLUDE_DIR} + PUBLIC $) target_sources(wallet_api PRIVATE - ${wallet_api_private_headers} - ${wallet_api_sources} - PUBLIC - FILE_SET HEADERS BASE_DIRS ${PROJECT_SOURCE_DIR}/src FILES ${wallet_api_headers}) + ${wallet_api_sources}) -monero_install_library(wallet_api "${CMAKE_INSTALL_INCLUDEDIR}/monero/wallet/api/") +monero_install_library(wallet_api + INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/monero/wallet/api/" + HEADERS "${wallet_api_headers}")