Author

Topic: CMake integration (Read 8518 times)

legendary
Activity: 1072
Merit: 1174
April 23, 2012, 09:59:08 PM
#8
What problems do you have with the current build system, and on which platform?
newbie
Activity: 11
Merit: 0
April 23, 2012, 09:46:21 PM
#7
Is anyone up to updating the CMake file? I'd love to get Bitcoin to build on my box, but the existing build system (or lack thereof) just doesn't work on it. I have no problem building Vidalia (a Qt app which uses CMake as build system), and I've been porting my projects to CMake, but none of them are GUI projects. I started to port Bitcoin to CMake, found that CMake doesn't have a library find module for Berkeley DB, searched for it, and landed on dkaparis's site.
legendary
Activity: 1072
Merit: 1174
April 20, 2012, 05:50:31 PM
#6
The previous post in this thread is 1.5 years old. We've since switched from the wx GUI ("bitcoin") to a Qt GUI ("bitcoin-qt"), and the version requirements for several libraries changed as well. We've also switched from SVN to GIT...

In any case, that cmake file will be severely outdated by now.
newbie
Activity: 11
Merit: 0
April 20, 2012, 05:02:08 PM
#5
I just cloned it and ran cmake and got this:

-- Found wxWidgets: TRUE
-- Found OpenSSL: /usr/lib/libssl.so;/usr/lib/libcrypto.so
-- Boost version: 1.46.1
-- Found the following Boost libraries:
--   system
--   filesystem
--   program_options
--   thread
--   date_time
--   regex
-- Could NOT find DB (missing:  DB_LIBRARIES)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
DB_LIB
    linked by target "bitcoin" in directory /home/phma/crypt/bitcoin-cmake
    linked by target "bitcoind" in directory /home/phma/crypt/bitcoin-cmake

-- Configuring incomplete, errors occurred!

I have several versions of db installed:

db-2.7.7nb3 =        Sleepycat Software's Berkeley DB version 2
db3-3.11.2nb4        Sleepycat Software's Berkeley DB version 3
db4-4.8.30 =         Berkeley DB version 4 from Oracle
db46-4.6.21 =        Berkeley DB version 4 from Oracle
db5-5.2.28 =         Berkeley DB version 5 from Oracle

And why is it looking for wxWidgets instead of Qt?
newbie
Activity: 53
Merit: 0
September 06, 2010, 06:11:03 AM
#4
thanks for this cmake thingy

I managed to compile in on linux (uname -a = Linux unimatrix0 2.6.34-gentoo-r6 #1 SMP PREEMPT Wed Aug 25 11:27:50 CEST 2010 x86_64 Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz GenuineIntel GNU/Linux, if anyone wants to know)
I just needed to remove some wx libs from the linker command because it was complaining it cannot find them. As it seems to link fine without them, i guess they are not really needed, and you can remove them. I have a patch below:

Code:
# HG changeset patch
# User Pavel Labath
# Date 1282931954 -7200
# Branch trunk
# Node ID 7d943971b02725095ceb0facb1cf457ede3bcfb3
# Parent  cb43a9fef788a4e9a9ee54fc96028d404c7fd818
Remove unneeded wxgtk libs.

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@
 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
 
 #find required libraries
-set(wxWidgets_USE_LIBS base core adv html tiff jpeg png zlib)
+set(wxWidgets_USE_LIBS base core adv html)
 find_package(wxWidgets)
 include(UsewxWidgets) #This will take care of wx include dirs and defines

Thanks, I'll add the change. I remember just copying the lib names straight from the original makefile, I suspected not all are used.
It's also worth noticing it can build bitcoind (the headless version) without any wxWidgets libraries at all (in fact I did that on my FreeBSD system).
newbie
Activity: 2
Merit: 0
August 27, 2010, 02:14:28 PM
#3
thanks for this cmake thingy

I managed to compile in on linux (uname -a = Linux unimatrix0 2.6.34-gentoo-r6 #1 SMP PREEMPT Wed Aug 25 11:27:50 CEST 2010 x86_64 Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz GenuineIntel GNU/Linux, if anyone wants to know)
I just needed to remove some wx libs from the linker command because it was complaining it cannot find them. As it seems to link fine without them, i guess they are not really needed, and you can remove them. I have a patch below:

Code:
# HG changeset patch
# User Pavel Labath
# Date 1282931954 -7200
# Branch trunk
# Node ID 7d943971b02725095ceb0facb1cf457ede3bcfb3
# Parent  cb43a9fef788a4e9a9ee54fc96028d404c7fd818
Remove unneeded wxgtk libs.

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@
 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
 
 #find required libraries
-set(wxWidgets_USE_LIBS base core adv html tiff jpeg png zlib)
+set(wxWidgets_USE_LIBS base core adv html)
 find_package(wxWidgets)
 include(UsewxWidgets) #This will take care of wx include dirs and defines
newbie
Activity: 53
Merit: 0
August 11, 2010, 06:44:11 PM
#2
It now builds on FreeBSD. Tested on 8.1 x64. I have no graphical environment on my test machine, so I haven't tested with wxWidgets. Volunteers are welcome.

Provided you set up all dependencies from the ports tree and have CMake installed, building Bitcoind should take only this:

hg clone https://[email protected]/dkaparis/bitcoin-cmake
cd bitcoin-cmake
mkdir build
cd build
cmake ..
make


Haven't tested on Linux yet, but it should be virtually the same. Again, volunteers are welcome.

Cheers.
newbie
Activity: 53
Merit: 0
August 05, 2010, 08:26:36 AM
#1
Greetings,

I have set up a mirror hg repository over at bitbucket for integrating the CMake build system:
http://bitbucket.org/dkaparis/bitcoin-cmake/

It's based on latest SVN and I'm regularly updating. My modifications are addition of build files and the fix for MSVC non-debug runtime compiling of the secure_allocator class I posted some time ago.

See the included build_cmake.txt file for more details.

Currently it's tested and works for Visual C++ 2008, both IDE and command-line builds.
Still not tested: MSVC x64, MinGW and UNIX builds.

Use it as you deem fit. Contributions are welcomed.
Jump to: