diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-03-02 17:20:42 +0200 |
---|---|---|
committer | Thomas Winget <tewinget@gmail.com> | 2015-03-17 18:26:38 -0400 |
commit | 3a3c07c3308718ae9bca2d59af1845f63c6a7700 (patch) | |
tree | 0eb1a2758aef1b7b6226df9e78c57d9cd509f8b2 /CMakeLists.txt | |
parent | moved 32-bit/64-bit detection into main CMakeLists (diff) | |
download | monero-3a3c07c3308718ae9bca2d59af1845f63c6a7700.tar.xz |
fixed msys2 / mingw folders based on architecture, added license to unbound CMakeList as that is not part of standard Unbound
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c7f04c6f9..e0900c3a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,12 +67,12 @@ enable_testing() # Check whether we're on a 32-bit or 64-bit system if(CMAKE_SIZEOF_VOID_P EQUAL "8") - message(STATUS "Building on a 64-bit system") - set(ARCH_WIDTH "64") + set(DEFAULT_ARCH_WIDTH "64") else() - message(STATUS "Building on a 32-bit system") - set(ARCH_WIDTH "32") + set(DEFAULT_ARCH_WIDTH "32") endif() +option(ARCH_WIDTH "Platform architecture in bits (32 or 64)" ${DEFAULT_ARCH_WIDTH}) +message(STATUS "Building for a ${ARCH_WIDTH}-bit system") # Check if we're on FreeBSD so we can exclude the local miniupnpc (it should be installed from ports instead) # CMAKE_SYSTEM_NAME checks are commonly known, but specifically taken from libsdl's CMakeLists @@ -105,16 +105,16 @@ endif() option(STATIC "Link libraries statically" ${DEFAULT_STATIC}) if(MINGW) - get_filename_component(msys2_install_path "[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MSYS2 64bit;InstallLocation]" ABSOLUTE) - set(CMAKE_INCLUDE_PATH "${msys2_install_path}/mingw64/include") + get_filename_component(msys2_install_path "[HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MSYS2 ${ARCH_WIDTH}bit;InstallLocation]" ABSOLUTE) + set(CMAKE_INCLUDE_PATH "${msys2_install_path}/mingw${ARCH_WIDTH}/include") # This is necessary because otherwise CMake will make Boost libraries -lfoo # rather than a full path. Unfortunately, this makes the shared libraries get # linked due to a bug in CMake which misses putting -static flags around the # -lfoo arguments. list(REMOVE_ITEM CMAKE_C_IMPLICIT_LINK_DIRECTORIES - "${msys2_install_path}/mingw64/lib") + "${msys2_install_path}/mingw${ARCH_WIDTH}/lib") list(REMOVE_ITEM CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES - "${msys2_install_path}/mingw64/lib") + "${msys2_install_path}/mingw${ARCH_WIDTH}/lib") endif() if(STATIC) |