Mercurial > trustbridge
comparison cinst/CMakeLists.txt @ 1142:148014db2f3b static-libc
(issue126) Commit WIP on static linking libc
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 18 Sep 2014 10:29:38 +0200 |
parents | fc4e1fe4e4d4 |
children |
comparison
equal
deleted
inserted
replaced
1136:e82c440c2727 | 1142:148014db2f3b |
---|---|
9 | 9 |
10 set(CMAKE_AUTOMOC OFF) | 10 set(CMAKE_AUTOMOC OFF) |
11 | 11 |
12 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../common) | 12 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../common) |
13 | 13 |
14 set(CMAKE_CXX_FLAGS "${EXTRA_STATIC_FLAGS}") | |
15 | |
14 set(CINST_SOURCES | 16 set(CINST_SOURCES |
15 ${CMAKE_CURRENT_SOURCE_DIR}/windowsstore.c | 17 ${CMAKE_CURRENT_SOURCE_DIR}/windowsstore.c |
16 ${CMAKE_CURRENT_SOURCE_DIR}/nssstore_linux.c | 18 ${CMAKE_CURRENT_SOURCE_DIR}/nssstore_linux.c |
17 ${CMAKE_CURRENT_SOURCE_DIR}/nssstore_win.c | 19 ${CMAKE_CURRENT_SOURCE_DIR}/nssstore_win.c |
18 ${CMAKE_CURRENT_SOURCE_DIR}/main.c | 20 ${CMAKE_CURRENT_SOURCE_DIR}/main.c |
21 | 23 |
22 if (WIN32) | 24 if (WIN32) |
23 set(WIN_EXTRA_LIBS -lcrypt32 -luserenv -lshell32) | 25 set(WIN_EXTRA_LIBS -lcrypt32 -luserenv -lshell32) |
24 endif(WIN32) | 26 endif(WIN32) |
25 | 27 |
28 #if(EXISTS "${CMAKE_PREFIX_PATH}/lib/libc.a") | |
29 # message(status "Linking against static libc: ${CMAKE_PREFIX_PATH}/lib/libc.a") | |
30 # set (LIBC_STATIC "${CMAKE_PREFIX_PATH}/lib/libc.a" "${CMAKE_PREFIX_PATH}/lib/libpthread.a") | |
31 #endif() | |
32 | |
33 message(fatal "cmake prefix ${CMAKE_PREFIX_PATH}") | |
26 target_link_libraries(cinst | 34 target_link_libraries(cinst |
27 trustbridge_common | 35 trustbridge_common |
28 ${PROFILING_LIBS} | 36 ${PROFILING_LIBS} |
29 ${POLARSSL_LIBRARIES} | 37 ${POLARSSL_LIBRARIES} |
30 ${WIN_EXTRA_LIBS}) | 38 ${WIN_EXTRA_LIBS} |
39 ${LIBC_STATIC} | |
40 pthread | |
41 ) | |
31 | 42 |
32 install(TARGETS cinst DESTINATION bin) | 43 install(TARGETS cinst DESTINATION bin) |
33 if (WIN32) | 44 if (WIN32) |
34 add_custom_command( | 45 add_custom_command( |
35 TARGET cinst | 46 TARGET cinst |