Don't copy include
[lwext4.git] / CMakeLists.txt
index 1ffb96ad540ba0897b4214c3854ee307c4254442..3d0554c14d5b8aa84a29a9e8dc95ea1007a095a8 100644 (file)
@@ -2,6 +2,7 @@ project(lwext4 C)
 cmake_minimum_required(VERSION 2.8)
 
 
+include_directories(include)
 include_directories(${PROJECT_BINARY_DIR}/include)
 include_directories(blockdev/filedev)
 include_directories(blockdev/filedev_win)
@@ -15,11 +16,11 @@ add_definitions(-DVERSION="${VERSION}")
 if    (CMAKE_SYSTEM_PROCESSOR STREQUAL  cortex-m0)
     #...
 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL  cortex-m3)
-    #...
+    add_definitions(-DCONFIG_UNALIGNED_ACCESS=1)
 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL  arm-sim)
     #...
 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL  cortex-m4)
-    #...
+    add_definitions(-DCONFIG_UNALIGNED_ACCESS=1)
 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL  bf518)
     #...
 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL  avrxmega7)
@@ -36,7 +37,11 @@ elseif(LIB_ONLY)
     add_definitions(-DCONFIG_BLOCK_DEV_CACHE_SIZE=16)
 else()
     #Generic example target
-    set(BLOCKDEV_TYPE  linux)
+    if (WIN32)
+      set(BLOCKDEV_TYPE  windows)
+    else()
+      set(BLOCKDEV_TYPE  linux)
+    endif()
     set (INSTALL_LIB 1)
     add_definitions(-DCONFIG_HAVE_OWN_OFLAGS=0)
     add_definitions(-DCONFIG_HAVE_OWN_ERRNO=0)
@@ -80,12 +85,6 @@ else()
     set_target_properties(lwext4 PROPERTIES COMPILE_FLAGS "-Wall -Wextra -pedantic")
 endif()
 
-#Config file generation
-file(
-    COPY include
-    DESTINATION .
-)
-
 #DISTRIBUTION
 set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
 set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")