Merge pull request #121 from kost/fix-cmake-python

pytrellis should be target if BUILD_PYTHON exists
diff --git a/README.md b/README.md
index 50455a8..a3c7c62 100644
--- a/README.md
+++ b/README.md
@@ -30,8 +30,8 @@
 
 Clone and install **latest git master** versions (Yosys 0.8 is not sufficient for ECP5 development) of [Yosys](https://github.com/YosysHQ/yosys)
  and [nextpnr](https://github.com/YosysHQ/nextpnr) according to their own instructions. Ensure
- to include the ECP5 architecture when building nextpnr; and point it towards your prjtrellis
- folder.
+ to include the [ECP5 architecture](https://github.com/YosysHQ/nextpnr#nextpnr-ecp5) when building nextpnr; and point it towards your prjtrellis
+ folder.  (for example: `cmake -DARCH=ecp5 -DTRELLIS_INSTALL_PREFIX=/usr .`)
 
 You should now be able to build the [examples](examples).
 
diff --git a/libtrellis/CMakeLists.txt b/libtrellis/CMakeLists.txt
index 2574b8a..10fd498 100644
--- a/libtrellis/CMakeLists.txt
+++ b/libtrellis/CMakeLists.txt
@@ -130,7 +130,7 @@
 file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/generated")
 set(LAST_GIT_VERSION "")
 if (NOT DEFINED CURRENT_GIT_VERSION)
-    execute_process(COMMAND git describe --tags OUTPUT_VARIABLE CURRENT_GIT_VERSION)
+    execute_process(COMMAND git describe --tags OUTPUT_VARIABLE CURRENT_GIT_VERSION WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
 endif()
 string(STRIP "${CURRENT_GIT_VERSION}" CURRENT_GIT_VERSION)
 if (EXISTS "${CMAKE_BINARY_DIR}/generated/last_git_version")