Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed linker errors in OSX under macports (related issue: 134)#145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 1 commit intocpp-netlib:masterfromkvikas:master
Sep 23, 2012
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
*.cmake
*.swp
*.pyc
CMakeCache.txt
Expand Down
4 changes: 4 additions & 0 deletionsCMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,10 @@

cmake_minimum_required(VERSION 2.8)
project(CPP-NETLIB)

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
find_package( ICU )

set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
find_package( Boost 1.45.0 REQUIRED unit_test_framework system regex date_time thread chrono filesystem program_options )
Expand Down
97 changes: 97 additions & 0 deletionsFindICU.cmake
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
# Finds the International Components for Unicode (ICU) Library
#
# ICU_FOUND - True if ICU found.
# ICU_I18N_FOUND - True if ICU's internationalization library found.
# ICU_INCLUDE_DIRS - Directory to include to get ICU headers
# Note: always include ICU headers as, e.g.,
# unicode/utypes.h
# ICU_LIBRARIES - Libraries to link against for the common ICU
# ICU_I18N_LIBRARIES - Libraries to link against for ICU internationaliation
# (note: in addition to ICU_LIBRARIES)

# Look for the header file.
find_path(
ICU_INCLUDE_DIR
NAMES unicode/utypes.h
DOC "Include directory for the ICU library")
mark_as_advanced(ICU_INCLUDE_DIR)

# Look for the library.
find_library(
ICU_LIBRARY
NAMES icuuc cygicuuc cygicuuc32
DOC "Libraries to link against for the common parts of ICU")
mark_as_advanced(ICU_LIBRARY)

# Copy the results to the output variables.
if(ICU_INCLUDE_DIR AND ICU_LIBRARY)
set(ICU_FOUND 1)
set(ICU_LIBRARIES ${ICU_LIBRARY})
set(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})

set(ICU_VERSION 0)
set(ICU_MAJOR_VERSION 0)
set(ICU_MINOR_VERSION 0)
if (EXISTS "${ICU_INCLUDE_DIR}/unicode/uvernum.h")
FILE(READ "${ICU_INCLUDE_DIR}/unicode/uvernum.h" _ICU_VERSION_CONENTS)
else()
FILE(READ "${ICU_INCLUDE_DIR}/unicode/uversion.h" _ICU_VERSION_CONENTS)
endif()

STRING(REGEX REPLACE ".*#define U_ICU_VERSION_MAJOR_NUM ([0-9]+).*" "\\1" ICU_MAJOR_VERSION "${_ICU_VERSION_CONENTS}")
STRING(REGEX REPLACE ".*#define U_ICU_VERSION_MINOR_NUM ([0-9]+).*" "\\1" ICU_MINOR_VERSION "${_ICU_VERSION_CONENTS}")

set(ICU_VERSION "${ICU_MAJOR_VERSION}.${ICU_MINOR_VERSION}")

# Look for the ICU internationalization libraries
find_library(
ICU_I18N_LIBRARY
NAMES icuin icui18n cygicuin cygicuin32
DOC "Libraries to link against for ICU internationalization")
mark_as_advanced(ICU_I18N_LIBRARY)
if (ICU_I18N_LIBRARY)
set(ICU_I18N_FOUND 1)
set(ICU_I18N_LIBRARIES ${ICU_I18N_LIBRARY})
else (ICU_I18N_LIBRARY)
set(ICU_I18N_FOUND 0)
set(ICU_I18N_LIBRARIES)
endif (ICU_I18N_LIBRARY)

# Look for the ICU data libraries
find_library(
ICU_DATA_LIBRARY
NAMES icudata cygicudata cygicudata32
DOC "Libraries to link against for ICU data")
mark_as_advanced(ICU_DATA_LIBRARY)
if (ICU_DATA_LIBRARY)
set(ICU_DATA_FOUND 1)
set(ICU_DATA_LIBRARIES ${ICU_DATA_LIBRARY})
else (ICU_DATA_LIBRARY)
set(ICU_DATA_FOUND 0)
set(ICU_DATA_LIBRARIES)
endif (ICU_DATA_LIBRARY)
else(ICU_INCLUDE_DIR AND ICU_LIBRARY)
set(ICU_FOUND 0)
set(ICU_I18N_FOUND 0)
set(ICU_DATA_FOUND 0)
set(ICU_LIBRARIES)
set(ICU_I18N_LIBRARIES)
set(ICU_DATA_LIBRARIES)
set(ICU_INCLUDE_DIRS)
set(ICU_VERSION)
set(ICU_MAJOR_VERSION)
set(ICU_MINOR_VERSION)
endif(ICU_INCLUDE_DIR AND ICU_LIBRARY)

IF(ICU_FOUND)
IF( NOT ICU_FIND_QUIETLY )
MESSAGE( STATUS "Found ICU header files in ${ICU_INCLUDE_DIRS}")
MESSAGE( STATUS "Found ICU libraries: ${ICU_LIBRARIES}")
ENDIF( NOT ICU_FIND_QUIETLY )
ELSE(ICU_FOUND)
IF(ICU_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could not find ICU" )
ELSE(ICU_FIND_REQUIRED)
MESSAGE( STATUS "Optional package ICU was not found" )
ENDIF(ICU_FIND_REQUIRED)
ENDIF(ICU_FOUND)
2 changes: 1 addition & 1 deletionlibs/mime/test/CMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@ set ( Boost_USE_MULTITHREADED ON )

if ( Boost_FOUND )
add_executable ( mime-roundtrip mime-roundtrip.cpp )
target_link_libraries ( mime-roundtrip${Boost_LIBRARIES})
target_link_libraries ( mime-roundtrip )
add_test ( mime-roundtrip mime-roundtrip )
endif ()

3 changes: 3 additions & 0 deletionslibs/network/test/http/CMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,6 +36,7 @@ if (Boost_FOUND)
)
target_link_libraries(cpp-netlib-http-${test}
${Boost_LIBRARIES}
${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
cppnetlib-message
cppnetlib-message-wrappers
Expand DownExpand Up@@ -65,6 +66,7 @@ if (Boost_FOUND)
add_executable(cpp-netlib-http-${test} ${test}.cpp)
target_link_libraries(cpp-netlib-http-${test}
${Boost_LIBRARIES}
${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
cppnetlib-constants
cppnetlib-uri
Expand DownExpand Up@@ -96,6 +98,7 @@ if (Boost_FOUND)
add_executable(cpp-netlib-http-${test} ${test}.cpp)
target_link_libraries(cpp-netlib-http-${test}
${Boost_LIBRARIES}
${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
cppnetlib-constants
cppnetlib-uri
Expand Down
2 changes: 1 addition & 1 deletionlibs/network/test/uri/CMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,7 +25,7 @@ if (Boost_FOUND)
add_executable(cpp-netlib-${test} ${test}.cpp)
add_dependencies(cpp-netlib-${test} cppnetlib-uri)
target_link_libraries(cpp-netlib-${test}
${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri)
${Boost_LIBRARIES} ${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-uri)
if (OPENSSL_FOUND)
target_link_libraries(cpp-netlib-${test} ${OPENSSL_LIBRARIES})
endif()
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp