cmake_minimum_required(VERSION 2.6) project(simple-crypto C) SET(CMAKE_BUILD_TYPE "Release") include(TestBigEndian) test_big_endian(isBigEndian) if (${isBigEndian}) add_definitions(-DWORDS_BIGENDIAN) endif() set(TEST 0) if(TEST) add_definitions(-DTEST_SIMPLE_CRYPTO) add_executable(smd5 md5.c) add_executable(stea tea.c) else() add_library(scrypto SHARED md5.c tea.c) INSTALL(TARGETS scrypto LIBRARY DESTINATION lib) INSTALL(FILES simplecrypto.h DESTINATION include) endif()