# Search for libraries and headers in the target directories only
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-#add_definitions(-Wall -std=c11)
add_definitions(-Wall)
-add_compile_options(-std=c++11)
-add_compile_options(--sysroot=/opt/cross/i686-linux-gnu-4.7/)
-#add_compile_options(-fPIC)
-#add_compile_options(-DSHARED)
-add_compile_options(-m32)
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 --sysroot=/opt/cross/i686-linux-gnu-4.7/" )
-#set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -print-search-dirs" )
-set(CMAKE_LIBRARY_PATH /opt/cross/i686-linux-gnu-4.7/usr/lib/x86_64-linux-gnu/32)
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Icross/include -Icross/i686-linux-gnu-4.7/include" )
+link_directories(${CMAKE_HOME_DIRECTORY}/cross/i686-linux-gnu-4.7/lib)