aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-10-21 11:13:59 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2014-10-23 16:42:34 -0400
commit89cff7bddc6f76ae7382e92569f9a902b262cc5f (patch)
tree0936a6a629f9fccd325c51851140009d698a98d8
parentMerge pull request #182 (diff)
downloadmonero-89cff7bddc6f76ae7382e92569f9a902b262cc5f.tar.xz
cmake: put each library into its own directory
This cleans up the CMake code and shows patterns more easily (to be refactored in the next commit).
Diffstat (limited to '')
-rw-r--r--src/CMakeLists.txt61
-rw-r--r--src/common/CMakeLists.txt64
-rw-r--r--src/connectivity_tool/CMakeLists.txt62
-rw-r--r--src/crypto/CMakeLists.txt79
-rw-r--r--src/cryptonote_core/CMakeLists.txt83
-rw-r--r--src/daemon/CMakeLists.txt89
-rw-r--r--src/miner/CMakeLists.txt66
-rw-r--r--src/mnemonics/CMakeLists.txt52
-rw-r--r--src/rpc/CMakeLists.txt57
-rw-r--r--src/simplewallet/CMakeLists.txt70
-rw-r--r--src/wallet/CMakeLists.txt59
11 files changed, 691 insertions, 51 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index aec615eb2..790b44593 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -32,55 +32,14 @@ add_definitions(-DSTATICLIB)
# miniupnp changed their static define
add_definitions(-DMINIUPNP_STATICLIB)
-file(GLOB_RECURSE COMMON common/*)
-file(GLOB_RECURSE CRYPTO crypto/*)
-file(GLOB_RECURSE CRYPTONOTE_CORE cryptonote_core/*)
-file(GLOB_RECURSE CRYPTONOTE_PROTOCOL cryptonote_protocol/*)
-file(GLOB_RECURSE DAEMON daemon/*)
-file(GLOB_RECURSE P2P p2p/*)
-file(GLOB_RECURSE RPC rpc/*)
-file(GLOB_RECURSE SIMPLEWALLET simplewallet/*)
-file(GLOB_RECURSE CONN_TOOL connectivity_tool/*)
-file(GLOB_RECURSE WALLET wallet/*)
-file(GLOB_RECURSE MINER miner/*)
-file(GLOB MNEMONICS mnemonics/*)
+add_subdirectory(common)
+add_subdirectory(crypto)
+add_subdirectory(cryptonote_core)
+add_subdirectory(mnemonics)
+add_subdirectory(rpc)
+add_subdirectory(wallet)
-source_group(common FILES ${COMMON})
-source_group(crypto FILES ${CRYPTO})
-source_group(cryptonote_core FILES ${CRYPTONOTE_CORE})
-source_group(cryptonote_protocol FILES ${CRYPTONOTE_PROTOCOL})
-source_group(daemon FILES ${DAEMON})
-source_group(p2p FILES ${P2P})
-source_group(rpc FILES ${RPC})
-source_group(simplewallet FILES ${SIMPLEWALLET})
-source_group(connectivity-tool FILES ${CONN_TOOL})
-source_group(wallet FILES ${WALLET})
-source_group(simpleminer FILES ${MINER})
-source_group(mnemonics FILES ${MNEMONICS})
-
-add_library(common ${COMMON})
-add_library(crypto ${CRYPTO})
-add_library(cryptonote_core ${CRYPTONOTE_CORE})
-add_library(mnemonics ${MNEMONICS})
-add_executable(daemon ${DAEMON} ${P2P} ${CRYPTONOTE_PROTOCOL})
-add_executable(connectivity_tool ${CONN_TOOL})
-add_executable(simpleminer ${MINER})
-target_link_libraries(daemon rpc cryptonote_core crypto common ${UNBOUND_LIBRARY} ${UPNP_LIBRARIES} ${Boost_LIBRARIES} ${EXTRA_LIBRARIES})
-target_link_libraries(connectivity_tool cryptonote_core crypto common ${UNBOUND_LIBRARY} ${Boost_LIBRARIES} ${EXTRA_LIBRARIES})
-target_link_libraries(simpleminer cryptonote_core crypto common ${UNBOUND_LIBRARY} ${Boost_LIBRARIES} ${EXTRA_LIBRARIES})
-add_library(rpc ${RPC})
-add_library(wallet ${WALLET})
-target_link_libraries(wallet mnemonics)
-add_executable(simplewallet ${SIMPLEWALLET} )
-target_link_libraries(simplewallet wallet rpc cryptonote_core crypto common mnemonics ${UNBOUND_LIBRARY} ${UPNP_LIBRARIES} ${Boost_LIBRARIES} ${EXTRA_LIBRARIES})
-add_dependencies(daemon version)
-add_dependencies(rpc version)
-add_dependencies(simplewallet version)
-
-set_property(TARGET common crypto cryptonote_core rpc wallet PROPERTY FOLDER "libs")
-set_property(TARGET daemon simplewallet connectivity_tool simpleminer PROPERTY FOLDER "prog")
-if (STATIC)
- set_property(TARGET daemon simplewallet connectivity_tool simpleminer PROPERTY LINK_SEARCH_START_STATIC 1)
- set_property(TARGET daemon simplewallet connectivity_tool simpleminer PROPERTY LINK_SEARCH_END_STATIC 1)
-endif()
-set_property(TARGET daemon PROPERTY OUTPUT_NAME "bitmonerod")
+add_subdirectory(connectivity_tool)
+add_subdirectory(miner)
+add_subdirectory(simplewallet)
+add_subdirectory(daemon)
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
new file mode 100644
index 000000000..347bee05b
--- /dev/null
+++ b/src/common/CMakeLists.txt
@@ -0,0 +1,64 @@
+# Copyright (c) 2014, The Monero Project
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice, this list
+# of conditions and the following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its contributors may be
+# used to endorse or promote products derived from this software without specific
+# prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# 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.
+
+set(common_sources
+ base58.cpp
+ command_line.cpp
+ dns_utils.cpp
+ util.cpp)
+
+set(common_headers
+ base58.h
+ boost_serialization_helper.h
+ command_line.h
+ dns_utils.h
+ int-util.h
+ pod-class.h
+ unordered_containers_boost_serialization.h
+ util.h
+ varint.h)
+
+source_group(common
+ FILES
+ ${common_sources}
+ ${common_headers})
+
+add_library(common
+ ${common_sources}
+ ${common_headers})
+target_link_libraries(common
+ PRIVATE
+ crypto
+ ${UNBOUND_LIBRARY}
+ ${Boost_DATE_TIME_LIBRARY}
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
+ ${EXTRA_LIBRARIES})
+set_property(TARGET common
+ PROPERTY
+ FOLDER "libs")
diff --git a/src/connectivity_tool/CMakeLists.txt b/src/connectivity_tool/CMakeLists.txt
new file mode 100644
index 000000000..150815a5d
--- /dev/null
+++ b/src/connectivity_tool/CMakeLists.txt
@@ -0,0 +1,62 @@
+# Copyright (c) 2014, The Monero Project
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice, this list
+# of conditions and the following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its contributors may be
+# used to endorse or promote products derived from this software without specific
+# prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# 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.
+
+set(connectivity_tool_sources
+ conn_tool.cpp)
+
+set(connectivity_tool_headers)
+
+source_group(connectivity-tool
+ FILES
+ ${connectivity_tool_sources}
+ ${connectivity_tool_headers})
+
+add_executable(connectivity_tool
+ ${connectivity_tool_sources}
+ ${connectivity_tool_headers})
+target_link_libraries(connectivity_tool
+ PRIVATE
+ cryptonote_core
+ crypto
+ common
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${Boost_PROGRAM_OPTIONS_LIBRARY}
+ ${Boost_REGEX_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY})
+set_property(TARGET connectivity_tool
+ PROPERTY
+ FOLDER "prog")
+
+if (STATIC)
+ set_property(TARGET connectivity_tool
+ PROPERTY
+ LINK_SEARCH_START_STATIC 1)
+ set_property(TARGET connectivity_tool
+ PROPERTY
+ LINK_SEARCH_END_STATIC 1)
+endif ()
diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt
new file mode 100644
index 000000000..d21551d14
--- /dev/null
+++ b/src/crypto/CMakeLists.txt
@@ -0,0 +1,79 @@
+# Copyright (c) 2014, The Monero Project
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice, this list
+# of conditions and the following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its contributors may be
+# used to endorse or promote products derived from this software without specific
+# prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# 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.
+
+set(crypto_sources
+ aesb.c
+ blake256.c
+ chacha8.c
+ crypto-ops-data.c
+ crypto-ops.c
+ crypto.cpp
+ groestl.c
+ hash-extra-blake.c
+ hash-extra-groestl.c
+ hash-extra-jh.c
+ hash-extra-skein.c
+ hash.c
+ jh.c
+ keccak.c
+ oaes_lib.c
+ random.c
+ skein.c
+ slow-hash.c
+ tree-hash.c)
+
+set(crypto_headers
+ blake256.h
+ chacha8.h
+ crypto-ops.h
+ crypto.h
+ generic-ops.h
+ groestl.h
+ groestl_tables.h
+ hash-ops.h
+ hash.h
+ initializer.h
+ jh.h
+ keccak.h
+ oaes_config.h
+ oaes_lib.h
+ random.h
+ skein.h
+ skein_port.h)
+
+source_group(crypto
+ FILES
+ ${crypto_sources}
+ ${crypto_headers})
+
+add_library(crypto
+ ${crypto_sources}
+ ${crypto_headers})
+set_property(TARGET crypto
+ PROPERTY
+ FOLDER "libs")
diff --git a/src/cryptonote_core/CMakeLists.txt b/src/cryptonote_core/CMakeLists.txt
new file mode 100644
index 000000000..dcca6e543
--- /dev/null
+++ b/src/cryptonote_core/CMakeLists.txt
@@ -0,0 +1,83 @@
+# Copyright (c) 2014, The Monero Project
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice, this list
+# of conditions and the following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its contributors may be
+# used to endorse or promote products derived from this software without specific
+# prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# 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.
+
+set(cryptonote_core_sources
+ account.cpp
+ blockchain_storage.cpp
+ checkpoints.cpp
+ checkpoints_create.cpp
+ cryptonote_basic_impl.cpp
+ cryptonote_core.cpp
+ cryptonote_format_utils.cpp
+ difficulty.cpp
+ miner.cpp
+ tx_pool.cpp)
+
+set(cryptonote_core_headers
+ account.h
+ account_boost_serialization.h
+ blockchain_storage.h
+ blockchain_storage_boost_serialization.h
+ checkpoints.h
+ checkpoints_create.h
+ connection_context.h
+ cryptonote_basic.h
+ cryptonote_basic_impl.h
+ cryptonote_boost_serialization.h
+ cryptonote_core.h
+ cryptonote_format_utils.h
+ cryptonote_stat_info.h
+ difficulty.h
+ miner.h
+ tx_extra.h
+ tx_pool.h
+ verification_context.h)
+
+source_group(cryptonote_core
+ FILES
+ ${cryptonote_core_sources}
+ ${cryptonote_core_headers})
+
+add_library(cryptonote_core
+ ${cryptonote_core_sources}
+ ${cryptonote_core_headers})
+target_link_libraries(cryptonote_core
+ PUBLIC
+ common
+ crypto
+ ${Boost_DATE_TIME_LIBRARY}
+ ${Boost_PROGRAM_OPTIONS_LIBRARY}
+ ${Boost_SERIALIZATION_LIBRARY}
+ PRIVATE
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
+ ${Boost_THREAD_LIBRARY}
+ ${EXTRA_LIBRARIES})
+set_property(TARGET cryptonote_core
+ PROPERTY
+ FOLDER "libs")
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
new file mode 100644
index 000000000..6cb5f8625
--- /dev/null
+++ b/src/daemon/CMakeLists.txt
@@ -0,0 +1,89 @@
+# Copyright (c) 2014, The Monero Project
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice, this list
+# of conditions and the following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its contributors may be
+# used to endorse or promote products derived from this software without specific
+# prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# 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.
+
+set(daemon_sources
+ daemon.cpp)
+
+set(daemon_headers
+ daemon_commands_handler.h
+
+ # cryptonote_protocol
+ ../cryptonote_protocol/blobdatatype.h
+ ../cryptonote_protocol/cryptonote_protocol_defs.h
+ ../cryptonote_protocol/cryptonote_protocol_handler.h
+ ../cryptonote_protocol/cryptonote_protocol_handler.inl
+ ../cryptonote_protocol/cryptonote_protocol_handler_common.h
+
+ # p2p
+ ../p2p/net_node.h
+ ../p2p/net_node.inl
+ ../p2p/net_node_common.h
+ ../p2p/net_peerlist.h
+ ../p2p/net_peerlist_boost_serialization.h
+ ../p2p/p2p_protocol_defs.h
+ ../p2p/stdafx.h)
+
+source_group(daemon
+ FILES
+ ${daemon_sources}
+ ${daemon_headers})
+
+add_executable(daemon
+ ${daemon_sources}
+ ${daemon_headers})
+target_link_libraries(daemon
+ PRIVATE
+ rpc
+ cryptonote_core
+ crypto
+ common
+ ${Boost_CHRONO_LIBRARY}
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_PROGRAM_OPTIONS_LIBRARY}
+ ${Boost_REGEX_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
+ ${Boost_THREAD_LIBRARY}
+ ${UPNP_LIBRARIES}
+ ${EXTRA_LIBRARIES})
+add_dependencies(daemon
+ version)
+set_property(TARGET daemon
+ PROPERTY
+ FOLDER "prog")
+set_property(TARGET daemon
+ PROPERTY
+ OUTPUT_NAME "bitmonerod")
+
+if (STATIC)
+ set_property(TARGET daemon
+ PROPERTY
+ LINK_SEARCH_START_STATIC 1)
+ set_property(TARGET daemon
+ PROPERTY
+ LINK_SEARCH_END_STATIC 1)
+endif ()
diff --git a/src/miner/CMakeLists.txt b/src/miner/CMakeLists.txt
new file mode 100644
index 000000000..551d9e70a
--- /dev/null
+++ b/src/miner/CMakeLists.txt
@@ -0,0 +1,66 @@
+# Copyright (c) 2014, The Monero Project
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice, this list
+# of conditions and the following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its contributors may be
+# used to endorse or promote products derived from this software without specific
+# prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# 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.
+
+set(simpleminer_sources
+ simpleminer.cpp)
+
+set(simpleminer_headers
+ simpleminer.h
+ simpleminer_protocol_defs.h
+ target_helper.h)
+
+source_group(simpleminer
+ FILES
+ ${simpleminer_sources}
+ ${simpleminer_headers})
+
+add_executable(simpleminer
+ ${simpleminer_sources}
+ ${simpleminer_headers})
+target_link_libraries(simpleminer
+ PRIVATE
+ cryptonote_core
+ common
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_PROGRAM_OPTIONS_LIBRARY}
+ ${Boost_REGEX_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
+ ${Boost_THREAD_LIBRARY}
+ ${EXTRA_LIBRARIES})
+set_property(TARGET simpleminer
+ PROPERTY
+ FOLDER "prog")
+
+if (STATIC)
+ set_property(TARGET simpleminer
+ PROPERTY
+ LINK_SEARCH_START_STATIC 1)
+ set_property(TARGET simpleminer
+ PROPERTY
+ LINK_SEARCH_END_STATIC 1)
+endif ()
diff --git a/src/mnemonics/CMakeLists.txt b/src/mnemonics/CMakeLists.txt
new file mode 100644
index 000000000..b0dc956ea
--- /dev/null
+++ b/src/mnemonics/CMakeLists.txt
@@ -0,0 +1,52 @@
+# Copyright (c) 2014, The Monero Project
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice, this list
+# of conditions and the following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its contributors may be
+# used to endorse or promote products derived from this software without specific
+# prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# 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.
+
+set(mnemonics_sources
+ electrum-words.cpp)
+
+set(mnemonics_headers
+ electrum-words.h
+ english.h
+ japanese.h
+ language_base.h
+ old_english.h
+ portuguese.h
+ singleton.h
+ spanish.h)
+
+source_group(mnemonics
+ FILES
+ ${mnemonics_sources}
+ ${mnemonics_headers})
+
+add_library(mnemonics
+ ${mnemonics_sources}
+ ${mnemonics_headers})
+target_link_libraries(mnemonics
+ PRIVATE
+ ${Boost_SYSTEM_LIBRARY})
diff --git a/src/rpc/CMakeLists.txt b/src/rpc/CMakeLists.txt
new file mode 100644
index 000000000..552655dc4
--- /dev/null
+++ b/src/rpc/CMakeLists.txt
@@ -0,0 +1,57 @@
+# Copyright (c) 2014, The Monero Project
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice, this list
+# of conditions and the following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its contributors may be
+# used to endorse or promote products derived from this software without specific
+# prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# 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.
+
+set(rpc_sources
+ core_rpc_server.cpp)
+
+set(rpc_headers
+ core_rpc_server.h
+ core_rpc_server_commands_defs.h
+ core_rpc_server_error_codes.h)
+
+source_group(rpc
+ FILES
+ ${rpc_sources}
+ ${rpc_headers})
+
+add_library(rpc
+ ${rpc_sources}
+ ${rpc_headers})
+target_link_libraries(rpc
+ PRIVATE
+ cryptonote_core
+ ${Boost_CHRONO_LIBRARY}
+ ${Boost_REGEX_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
+ ${Boost_THREAD_LIBRARY}
+ ${EXTRA_LIBRARIES})
+add_dependencies(rpc
+ version)
+set_property(TARGET rpc
+ PROPERTY
+ FOLDER "libs")
diff --git a/src/simplewallet/CMakeLists.txt b/src/simplewallet/CMakeLists.txt
new file mode 100644
index 000000000..756b8d753
--- /dev/null
+++ b/src/simplewallet/CMakeLists.txt
@@ -0,0 +1,70 @@
+# Copyright (c) 2014, The Monero Project
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice, this list
+# of conditions and the following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its contributors may be
+# used to endorse or promote products derived from this software without specific
+# prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# 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.
+
+set(simplewallet_sources
+ simplewallet.cpp
+ password_container.cpp)
+
+set(simplewallet_headers
+ simplewallet.h
+ password_container.h)
+
+source_group(simplewallet
+ FILES
+ ${simplewallet_sources}
+ ${simplewallet_headers})
+
+add_executable(simplewallet
+ ${simplewallet_sources}
+ ${simplewallet_headers})
+target_link_libraries(simplewallet
+ PRIVATE
+ wallet
+ rpc
+ cryptonote_core
+ crypto
+ common
+ mnemonics
+ ${UNBOUND_LIBRARY}
+ ${UPNP_LIBRARIES}
+ ${Boost_LIBRARIES}
+ ${EXTRA_LIBRARIES})
+add_dependencies(simplewallet
+ version)
+set_property(TARGET simplewallet
+ PROPERTY
+ FOLDER "prog")
+
+if (STATIC)
+ set_property(TARGET simplewallet
+ PROPERTY
+ LINK_SEARCH_START_STATIC 1)
+ set_property(TARGET simplewallet
+ PROPERTY
+ LINK_SEARCH_END_STATIC 1)
+endif ()
diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt
new file mode 100644
index 000000000..7428cc390
--- /dev/null
+++ b/src/wallet/CMakeLists.txt
@@ -0,0 +1,59 @@
+# Copyright (c) 2014, The Monero Project
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification, are
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice, this list of
+# conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice, this list
+# of conditions and the following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its contributors may be
+# used to endorse or promote products derived from this software without specific
+# prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# 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.
+
+set(wallet_sources
+ wallet2.cpp
+ wallet_rpc_server.cpp)
+
+set(wallet_headers
+ wallet2.h
+ wallet_errors.h
+ wallet_rpc_server.h
+ wallet_rpc_server_commands_defs.h
+ wallet_rpc_server_error_codes.h)
+
+source_group(wallet
+ FILES
+ ${wallet_sources}
+ ${wallet_headers})
+
+add_library(wallet
+ ${wallet_sources}
+ ${wallet_headers})
+target_link_libraries(wallet
+ PUBLIC
+ cryptonote_core
+ mnemonics
+ PRIVATE
+ ${Boost_SERIALIZATION_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
+ ${Boost_THREAD_LIBRARY}
+ ${EXTRA_LIBRARIES})
+set_property(TARGET wallet
+ PROPERTY
+ FOLDER "libs")