aboutsummaryrefslogtreecommitdiff
path: root/contrib/depends/toolchain.cmake.in
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2018-03-20 01:26:35 +0100
committerTheCharlatan <seb.kung@gmail.com>2018-09-10 22:03:42 +0200
commit8db3d5731bc999983ca6c776731a26a4e97d8bc8 (patch)
tree827e31e63fce7f604de95d0951ef4c951b886bce /contrib/depends/toolchain.cmake.in
parentInitial depends addition (diff)
downloadmonero-8db3d5731bc999983ca6c776731a26a4e97d8bc8.tar.xz
Modify depends for monero's dependencies
Add readline, ldns, graphviz, unbound to depends packages Add a cmake toolchain file to depends that is uniquely created for every build and placed in triple/share/toolchain.cmake This file is then passed to cmake with -DCMAKE_TOOLCHAIN_FILE=/path/to/triple/share/toolchain.cmake Add the boost locale package to depends In the depends cmake toolchain file, a DEPENDS flag is added to exclude, or change cmake checks done that are required for depends Link miniupnpc and unwind from depends and not external Add libiconv and icu4c to depends, required for mingw32 builds. Headers (winsock) need to be lower case in order to compile on unix systems. This should not affect building on windows.
Diffstat (limited to '')
-rw-r--r--contrib/depends/toolchain.cmake.in45
1 files changed, 45 insertions, 0 deletions
diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in
new file mode 100644
index 000000000..eb4fcba04
--- /dev/null
+++ b/contrib/depends/toolchain.cmake.in
@@ -0,0 +1,45 @@
+# this one is important
+SET(CMAKE_SYSTEM_NAME @depends@)
+
+#this one not so much
+SET(CMAKE_SYSTEM_VERSION 1)
+
+# specify the cross compiler
+SET(CMAKE_C_COMPILER @CC@)
+SET(CMAKE_CXX_COMPILER @CXX@)
+
+SET(STATIC true)
+SET(UNBOUND_STATIC true)
+
+# where is the target environment
+SET(CMAKE_FIND_ROOT_PATH @prefix@ /usr)
+
+SET(THREADS_PTHREAD_ARG "2" CACHE STRING "Forcibly set by CMakeLists.txt." FORCE)
+SET(Readline_ROOT_DIR @prefix@)
+
+SET(LIBUNWIND_INCLUDE_DIR @prefix@/include)
+SET(LIBUNWIND_LIBRARIES @prefix@/lib/libunwind.a)
+SET(LIBUNWIND_LIBRARY_DIRS @prefix@/lib)
+
+SET(UNBOUND_INCLUDE_DIR @prefix@/include)
+SET(UNBOUND_LIBRARIES @prefix@/lib)
+SET(UNBOUND_LIBRARY @prefix@/lib/libunbound.a)
+
+SET(ZMQ_INCLUDE_PATH @prefix@/include)
+SET(ZMQ_LIB @prefix@/lib/libzmq.a)
+
+#SET(BOOST_IGNORE_SYSTEM_PATHS_DEFAULT ON)
+#SET(BOOST_IGNORE_SYSTEM_PATH ON)
+#SET(BOOST_ROOT @prefix@)
+#SET(BOOST_LIBRARYDIR @prefix@/lib)
+
+# for libraries and headers in the target directories
+set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
+set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
+set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
+
+#set (MINGW_FLAG "-m64")
+#set (USE_LTO_DEFAULT false)
+
+#Create a new cmake flag that indicates building with depends
+set (DEPENDS true)