]> git.donarmstrong.com Git - kiibohd-controller.git/commitdiff
More fixes for Windows compilation.
authorJacob Alexander <haata@kiibohd.com>
Fri, 18 Apr 2014 01:49:40 +0000 (18:49 -0700)
committerJacob Alexander <haata@kiibohd.com>
Fri, 18 Apr 2014 01:49:40 +0000 (18:49 -0700)
CMakeLists.txt
LoadFile/load
README
setup.cmake

index 503621b84137cb2638308f913b61b6ab8076de6b..f9078abe43cbbe6e8cefff5a842e2bc2ed9de15c 100644 (file)
@@ -25,8 +25,8 @@ set( CMAKE_USE_RELATIVE_PATHS  1 )
 #| "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 @@ add_custom_target( SizeAfter ALL
 # 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()
 
index e01357eb7fc0d795014ae9d80e330a37c106f1c4..da03c8c9c30b036c41f38f99a1df69024851115f 100755 (executable)
@@ -5,7 +5,7 @@ if [ ! -e teensy-loader-cli/teensy-loader-cli ]; then
        # 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
diff --git a/README b/README
index 4ad1182be35de3620fd58b3500e84e5f6c49ab28..93a7866874cb907b80a3a3e1184bc5f9a9719884 100644 (file)
--- a/README
+++ b/README
@@ -43,13 +43,17 @@ Compiling on Windows does work, just it's a bunch more work.
 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 @@ Windows Building
 From this directory.
 mkdir build
 cd build
-cmake -G "Unix Makefiles" ..
+wincmake -G "Unix Makefiles" ..
 
 
 Example output:
index 4324b0fbe21c56dc6a047989f56eda084edb3f10..93b372e0829cf2621234ae7673f19162244b6ea3 100644 (file)
@@ -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" )