aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/main.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-08 11:17:04 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-08 11:17:04 +0200
commitc16a971c0fe5980a2d6da23e7d3d6d917cb9dc67 (patch)
tree7258aa4dbe3ff282ecc3a8ed12ff088a06c35a07 /ice40/main.cc
parent7f330af9f397ab121e11723bdf7b976630b7e450 (diff)
downloadnextpnr-c16a971c0fe5980a2d6da23e7d3d6d917cb9dc67.tar.gz
nextpnr-c16a971c0fe5980a2d6da23e7d3d6d917cb9dc67.tar.bz2
nextpnr-c16a971c0fe5980a2d6da23e7d3d6d917cb9dc67.zip
python: Fixing builds as importable module
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/main.cc')
-rw-r--r--ice40/main.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ice40/main.cc b/ice40/main.cc
index 9fb6b0aa..073bbae2 100644
--- a/ice40/main.cc
+++ b/ice40/main.cc
@@ -16,6 +16,9 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
+
+#ifndef PYTHON_MODULE
+
#include <QApplication>
#include <boost/program_options.hpp>
#include <fstream>
@@ -263,3 +266,5 @@ int main(int argc, char *argv[])
deinit_python();
return rc;
}
+
+#endif