aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-06-23 10:14:40 +0000
committerwhitequark <whitequark@whitequark.org>2020-06-23 10:47:18 +0000
commit4c7aedcf4ec4a93b0b3ab3f8ab68fe804a1e21cd (patch)
tree8f4aa9f8cc3914cd28880c768d1d5fd72060f75d /CMakeLists.txt
parentc9e7d1448eaa4644d18073316e30586f2cb1d75a (diff)
downloadnextpnr-4c7aedcf4ec4a93b0b3ab3f8ab68fe804a1e21cd.tar.gz
nextpnr-4c7aedcf4ec4a93b0b3ab3f8ab68fe804a1e21cd.tar.bz2
nextpnr-4c7aedcf4ec4a93b0b3ab3f8ab68fe804a1e21cd.zip
CMake: promote bba to a true subproject.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21133e3d..e3630fde 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -238,7 +238,21 @@ if(MINGW)
add_definitions("-Wa,-mbig-obj")
endif(MINGW)
-include(bba/bba.cmake)
+if(CMAKE_CROSSCOMPILING)
+ set(BBA_IMPORT "IMPORTFILE-NOTFOUND" CACHE FILEPATH
+ "Path to the `bba-export.cmake` export file from a native build")
+ include(${BBA_IMPORT})
+else()
+ add_subdirectory(bba)
+endif()
+
+include(TestBigEndian)
+test_big_endian(IS_BIG_ENDIAN)
+if(IS_BIG_ENDIAN)
+ set(BBASM_ENDIAN_FLAG "--be")
+else()
+ set(BBASM_ENDIAN_FLAG "--le")
+endif()
foreach (family ${ARCH})
message(STATUS "Configuring architecture : ${family}")