changeset 142:552c77d294ef

More fixes for Windows compilation.
author Jacob Alexander <haata@kiibohd.com>
date Thu, 17 Apr 2014 18:49:40 -0700
parents 6e09a82d15ee
children f2e4dd42bdab
files CMakeLists.txt LoadFile/load README setup.cmake
diffstat 4 files changed, 20 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Thu Apr 17 00:34:27 2014 -0700
+++ b/CMakeLists.txt	Thu Apr 17 18:49:40 2014 -0700
@@ -25,8 +25,8 @@
 #| "avr"       # Teensy++ 2.0
 #| "arm"       # Teensy   3.0
 #| "arm"       # Teensy   3.1
-#set( COMPILER_FAMILY "arm" )
-set( COMPILER_FAMILY "avr" )
+set( COMPILER_FAMILY "arm" )
+#set( COMPILER_FAMILY "avr" )
 
 message( STATUS "Compiler Family:" )
 message( "${COMPILER_FAMILY}" )
@@ -154,6 +154,13 @@
 # Setup Loader Script and Program
 #
 
+
 #| Provides the user with the correct teensy-loader-cli command for the built .HEX file
-configure_file( LoadFile/load load )
+#| Windows
+if( ${CMAKE_SYSTEM_NAME} MATCHES "Windows" )
+	configure_file( LoadFile/winload load NEWLINE_STYLE UNIX )
+#| Default
+else()
+	configure_file( LoadFile/load load NEWLINE_STYLE UNIX )
+endif()
 
--- a/LoadFile/load	Thu Apr 17 00:34:27 2014 -0700
+++ b/LoadFile/load	Thu Apr 17 18:49:40 2014 -0700
@@ -5,7 +5,7 @@
 	# Compile teensy-loader-cli
 	mkdir -p teensy-loader-cli
 	cd teensy-loader-cli
-	cmake @CMAKE_SOURCE_DIR@/LoadFile
+	cmake -G "Unix Makefiles" @CMAKE_SOURCE_DIR@/LoadFile
 	make
 	cd -
 fi
--- a/README	Thu Apr 17 00:34:27 2014 -0700
+++ b/README	Thu Apr 17 18:49:40 2014 -0700
@@ -43,13 +43,17 @@
 First make sure Cygwin is installed - http://www.cygwin.com/ - 32bit or 64bit is fine. Make sure the following are installed:
 - make
 - git (needed for some compilation info)
+- cmake
+- gcc-core
+- gcc-g++ or gcc-c++
 
 And make sure CMake is *NOT* installed through Cygwin. This is extremely important.
 If this is not possible, you'll have to play with your paths in Cygwin to prioritize the Windows version of CMake.
 
-Install the latest version of CMake - http://cmake.org/cmake/resources/software.html
-Make sure to have CMake add itself to at least your PATH in the installer.
-(If this errors out, you'll have to add CMake to your .bashrc path).
+Also install the Windows version of CMake - http://cmake.org/cmake/resources/software.html
+This is in addition to the Cygwin version. This is an easier alternative to installing another C compiler.
+Add the following line to your .bashrc, making sure the CMake path is correct:
+  alias wincmake="PATH='/cygdrive/c/Program Files (x86)/CMake 2.8'/bin:\"${PATH}\" cmake"
 
 Next, install the compiler(s) you want.
 
@@ -304,7 +308,7 @@
 From this directory.
 mkdir build
 cd build
-cmake -G "Unix Makefiles" ..
+wincmake -G "Unix Makefiles" ..
 
 
 Example output:
--- a/setup.cmake	Thu Apr 17 00:34:27 2014 -0700
+++ b/setup.cmake	Thu Apr 17 18:49:40 2014 -0700
@@ -20,7 +20,7 @@
 #| Please look at the {Scan,Macro,USB,Debug}/module.txt for information on the modules and how to create new ones
 
 ##| Deals with acquiring the keypress information and turning it into a key index
-set(   ScanModule "DPH" )
+set(   ScanModule "ADCTest" )
 
 ##| Provides the mapping functions for DefaultMap and handles any macro processing before sending to the OutputModule
 set(  MacroModule "PartialMap" )