overte/domain-server/CMakeLists.txt
2015-04-30 13:32:25 -07:00

38 lines
1.5 KiB
CMake

set(TARGET_NAME domain-server)
if (UPPER_CMAKE_BUILD_TYPE MATCHES DEBUG AND NOT WIN32)
set(_SHOULD_SYMLINK_RESOURCES FALSE)
else ()
set(_SHOULD_SYMLINK_RESOURCES FALSE)
endif ()
if (NOT ${_SHOULD_SYMLINK_RESOURCES})
# since we aren't going to symlink the resources, we should add them as sources for this target
# this should cause the target to be re-built should one of the files change
file(GLOB_RECURSE TARGET_RSRCS "${CMAKE_CURRENT_SOURCE_DIR}/resources/*")
endif ()
# setup the project and link required Qt modules
setup_hifi_project(Network)
symlink_or_copy_directory_beside_target(${_SHOULD_SYMLINK_RESOURCES} "${CMAKE_CURRENT_SOURCE_DIR}/resources" "resources")
# link the shared hifi libraries
link_hifi_libraries(embedded-webserver networking shared)
# find OpenSSL
find_package(OpenSSL REQUIRED)
if (APPLE AND ${OPENSSL_INCLUDE_DIR} STREQUAL "/usr/include")
# this is a user on OS X using system OpenSSL, which is going to throw warnings since they're deprecating for their common crypto
message(WARNING "The found version of OpenSSL is the OS X system version. This will produce deprecation warnings."
"\nWe recommend you install a newer version (at least 1.0.1h) in a different directory and set OPENSSL_ROOT_DIR in your env so Cmake can find it.")
endif ()
include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
# append OpenSSL to our list of libraries to link
target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES})
copy_dlls_beside_windows_executable()