2012-11-29 23:27:02 +00:00
|
|
|
# synergy -- mouse and keyboard sharing utility
|
2013-04-04 16:17:25 +00:00
|
|
|
# Copyright (C) 2013 Bolton Software Ltd.
|
2012-11-29 23:27:02 +00:00
|
|
|
#
|
|
|
|
# This package is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# found in the file COPYING that should have accompanied this file.
|
|
|
|
#
|
|
|
|
# This package is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2013-04-11 00:36:45 +00:00
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2012-11-29 23:27:02 +00:00
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2013-04-11 00:36:45 +00:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2012-11-29 23:27:02 +00:00
|
|
|
|
2013-04-03 12:59:02 +00:00
|
|
|
set(cpp_dir cryptopp562)
|
2012-11-30 01:07:04 +00:00
|
|
|
|
2013-04-03 12:59:02 +00:00
|
|
|
file(GLOB cpp_src ${cpp_dir}/*.cpp)
|
2012-11-29 23:27:02 +00:00
|
|
|
|
2013-04-03 12:59:02 +00:00
|
|
|
if (WIN32)
|
2013-04-11 00:30:41 +00:00
|
|
|
file(GLOB cpp_hdr ${cpp_dir}/*.h)
|
2013-04-03 12:59:02 +00:00
|
|
|
list(APPEND cpp_src ${cpp_hdr})
|
|
|
|
endif()
|
2012-11-29 23:27:02 +00:00
|
|
|
|
2013-04-10 17:27:25 +00:00
|
|
|
file(GLOB cpp_ignore
|
2013-04-11 00:30:41 +00:00
|
|
|
${cpp_dir}/simple.cpp
|
|
|
|
${cpp_dir}/strciphr.cpp
|
|
|
|
${cpp_dir}/polynomi.cpp
|
|
|
|
${cpp_dir}/eprecomp.cpp
|
|
|
|
${cpp_dir}/eccrypto.cpp
|
|
|
|
${cpp_dir}/algebra.cpp)
|
2013-04-10 17:27:25 +00:00
|
|
|
list(REMOVE_ITEM cpp_src ${cpp_ignore})
|
|
|
|
|
2013-04-11 00:30:41 +00:00
|
|
|
# if 64-bit windows, compile asm file.
|
|
|
|
if (CMAKE_CL_64)
|
|
|
|
list(APPEND cpp_src ${cpp_dir}/x64dll.asm ${cpp_dir}/x64masm.asm)
|
|
|
|
|
|
|
|
add_custom_command(OUTPUT $(IntDir)x64dll.obj
|
|
|
|
COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64dll.obj /Zi
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/${cpp_dir}/x64dll.asm"
|
|
|
|
MAIN_DEPENDENCY ${cpp_dir}/x64dll.asm
|
|
|
|
VERBATIM)
|
|
|
|
|
|
|
|
add_custom_command(OUTPUT $(IntDir)x64masm.obj
|
|
|
|
COMMAND ml64.exe /c /nologo /Fo$(IntDir)x64masm.obj /Zi
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/${cpp_dir}/x64masm.asm"
|
|
|
|
MAIN_DEPENDENCY ${cpp_dir}/x64masm.asm
|
|
|
|
VERBATIM)
|
2013-04-05 00:01:54 +00:00
|
|
|
endif()
|
|
|
|
|
2013-04-11 02:41:56 +00:00
|
|
|
if (UNIX)
|
2013-04-11 03:18:40 +00:00
|
|
|
add_definitions(-DCRYPTOPP_DISABLE_ASM)
|
2013-04-11 02:41:56 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -pipe")
|
|
|
|
|
|
|
|
if (APPLE)
|
2013-04-11 03:18:40 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -arch i386")
|
|
|
|
if (DARWIN_VERSION GREATER 10)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-tautological-compare")
|
|
|
|
endif()
|
2013-04-11 02:41:56 +00:00
|
|
|
else()
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
|
|
|
endif()
|
2013-04-04 22:38:07 +00:00
|
|
|
endif()
|
|
|
|
|
2013-04-03 12:59:02 +00:00
|
|
|
add_library(cryptopp STATIC ${cpp_src})
|