diff options
author | Tim Besard <tim.besard@gmail.com> | 2011-11-27 12:46:32 +0100 |
---|---|---|
committer | Tim Besard <tim.besard@gmail.com> | 2011-11-27 12:46:32 +0100 |
commit | 1c75ed72e32e3155490382f0716a732f86069b52 (patch) | |
tree | 112f8e25f4e48aaa44aa3ea66e2ac4aad5ea3e4c | |
parent | cd350998e04d40bd123876beb3bd44b927e6cca5 (diff) |
Adding cross-compile option.
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 366b4c4..64fd73f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,15 @@ project(pChase) SET(CMAKE_BUILD_TYPE "Release") +option(CROSS_32BIT "Cross-build a 32-bit binary on a 64-bit system" OFF) +if (CROSS_32BIT) + message(STATUS "NOTICE: building a 32-bit binary") + add_definitions(-m32) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32") + set(CMAKE_SHARED_LIBRARY_C_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS} -m32") + set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS} -m32") +endif () + set (pChase_VERSION_MAJOR 0) set (pChase_VERSION_MINOR 4) |