Mercurial > hg > orthanc
annotate OrthancCppClient/CMakeLists.txt @ 403:c3e9b74aab7a
log
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Apr 2013 12:05:21 +0200 |
parents | 77aec9be0a51 |
children | 6f8ae46ed90e |
rev | line source |
---|---|
60
77aec9be0a51
renaming of cppclient
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
57
diff
changeset
|
1 # Mini-project to check whether "OrthancCppClient" can compile in a |
0 | 2 # standalone fashion |
3 | |
4 cmake_minimum_required(VERSION 2.8) | |
5 | |
60
77aec9be0a51
renaming of cppclient
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
57
diff
changeset
|
6 project(OrthancCppClientTest) |
0 | 7 |
8 SET(STATIC_BUILD OFF) | |
9 | |
10 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DownloadPackage.cmake) | |
11 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/JsonCppConfiguration.cmake) | |
12 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/LibCurlConfiguration.cmake) | |
13 | |
14 if (${CMAKE_COMPILER_IS_GNUCXX}) | |
15 set(CMAKE_C_FLAGS "-Wall -pedantic -Wno-implicit-function-declaration") # --std=c99 makes libcurl not to compile | |
16 set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wno-long-long -Wno-variadic-macros") | |
17 set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed") | |
18 set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined") | |
19 elseif (${MSVC}) | |
20 add_definitions(-D_CRT_SECURE_NO_WARNINGS=1) | |
21 endif() | |
22 | |
60
77aec9be0a51
renaming of cppclient
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
57
diff
changeset
|
23 add_library(OrthancCppClient |
0 | 24 SHARED |
25 | |
26 ${THIRD_PARTY_SOURCES} | |
27 HttpException.cpp | |
28 HttpClient.cpp | |
29 ) | |
30 | |
31 add_executable(Test | |
32 main.cpp | |
33 ) | |
34 | |
60
77aec9be0a51
renaming of cppclient
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
57
diff
changeset
|
35 target_link_libraries(Test OrthancCppClient) |