From 52921a9e13484319df2d4f1153521f3f5e12b932 Mon Sep 17 00:00:00 2001 From: Vitaly Svyastyn Date: Sun, 5 Nov 2017 19:33:01 +0600 Subject: More CMake (#1016) * Generate version information before build. * Removed /EHsc from compile options. * CMake files for the rest of protocols. * CMake 64 bit build. * CMake: precompiled headers. --- libs/CMakeLists.txt | 3 ++- libs/libevent/CMakeLists.txt | 6 ++++++ libs/libjson/CMakeLists.txt | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 libs/libevent/CMakeLists.txt (limited to 'libs') diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index 5c360a5ef0..67fdb72838 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -1,3 +1,4 @@ add_subdirectory(zlib) add_subdirectory(libjson) -add_subdirectory(libaxolotl) \ No newline at end of file +add_subdirectory(libaxolotl) +add_subdirectory(libevent) \ No newline at end of file diff --git a/libs/libevent/CMakeLists.txt b/libs/libevent/CMakeLists.txt new file mode 100644 index 0000000000..ce54ab9827 --- /dev/null +++ b/libs/libevent/CMakeLists.txt @@ -0,0 +1,6 @@ +file(GLOB SOURCES "src/*.h" "src/*.c" "src/WIN32-Code/*.c") +set(TARGET libevent) +include_directories("include" "src/compat") +include(${CMAKE_SOURCE_DIR}/cmake/lib.cmake) +set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS "EVENT__NEED_DLLIMPORT") +target_link_libraries(${TARGET} libeay32.lib ssleay32.lib) \ No newline at end of file diff --git a/libs/libjson/CMakeLists.txt b/libs/libjson/CMakeLists.txt index e76677a636..62b68e2eb2 100644 --- a/libs/libjson/CMakeLists.txt +++ b/libs/libjson/CMakeLists.txt @@ -1,4 +1,9 @@ -file(GLOB SOURCES "src/*.h" "src/*.cpp" "src/libjson.def") +file(GLOB SOURCES "src/*.h" "src/*.cpp") +if(CMAKE_CL_64) + list(APPEND SOURCES "src/libjson64.def") +else() + list(APPEND SOURCES "src/libjson.def") +endif() set(TARGET libjson) include(${CMAKE_SOURCE_DIR}/cmake/lib.cmake) -- cgit v1.2.3