Created
May 3, 2017 21:32
-
-
Save matrixd/6d29ad1a866c807522bb86fdfe612810 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.2) | |
#set(CMAKE_BINARY_DIR build) | |
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) | |
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) | |
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) | |
project(myproj) | |
list(APPEND SOURCES "main.cpp") | |
list(APPEND SOURCES "connection.cpp") | |
list(APPEND SOURCES "data.cpp") | |
list(APPEND SOURCES "dbwriter.cpp") | |
list(APPEND SOURCES "httpdatahandler.cpp") | |
list(APPEND SOURCES "server.cpp") | |
list(APPEND SOURCES "simplehttpserver.cpp") | |
list(APPEND SOURCES "simplepacketparser.cpp") | |
set(CMAKE_AUTOMOC true) | |
add_executable(${PROJECT_NAME} ${SOURCES} ${moc}) | |
find_package(PkgConfig REQUIRED) | |
pkg_search_module(MONGO REQUIRED libmongocxx) | |
find_package( Qt5Core REQUIRED ) | |
find_package( Qt5Network REQUIRED ) | |
find_package( Qt5Concurrent REQUIRED ) | |
set(LIBS ${MONGO_STATIC_LIBRARIES} "pthread" Qt5::Core Qt5::Concurrent Qt5::Network) | |
target_link_libraries( | |
${PROJECT_NAME} | |
${LIBS} | |
) | |
link_directories( | |
${MONGO_LIBRARY_DIRS} | |
) | |
include_directories( | |
${MONGO_INCLUDE_DIRS} ./ | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment