cmake: uniform indent everywhere

Indent with tabs, remove leading/trailing blank lines and spaces.
This commit is contained in:
Ilya Tumaykin 2016-03-16 20:38:32 +03:00
parent b88a66f3f1
commit b44be77be6
No known key found for this signature in database
GPG Key ID: FCF6A8810E836D1C
5 changed files with 63 additions and 73 deletions

View File

@ -36,8 +36,7 @@ set (DIR_INCLUDE ${DIR_PREFIX}/include)
set (DIR_SHARE ${DIR_PREFIX}/share)
set (DIR_ETC ${DIR_PREFIX}/etc)
set (CMAKE_INSTALL_BINDIR bin
CACHE STRING "Install location of executables")
set (CMAKE_INSTALL_BINDIR bin CACHE STRING "Install location of executables")
if (DEFINED CMAKE_INSTALL_LIBDIR)
set (DIR_LIBRARY ${CMAKE_INSTALL_LIBDIR})
@ -64,11 +63,9 @@ set (DIR_SHARE_LOCALE ${DIR_SHARE}/locale)
option(BUILD_SHARED_LIBS "Build shared library and link executable against it"
ON)
if (BUILD_SHARED_LIBS)
option(BUILD_STATIC "Build static library"
ON)
option(BUILD_STATIC "Build static library" ON)
endif (BUILD_SHARED_LIBS)
option(BUILD_BINARY "Build executable"
ON)
option(BUILD_BINARY "Build executable" ON)
configure_file(
uchardet.pc.in

View File

@ -1,4 +1,3 @@
set(
UCHARDET_HEADERS
uchardet.h
@ -44,7 +43,7 @@ set(
set (UCHARDET_TARGET libuchardet)
if (BUILD_STATIC AND BUILD_SHARED_LIBS)
set (UCHARDET_STATIC_TARGET libuchardet_static)
set (UCHARDET_STATIC_TARGET libuchardet_static)
endif ()
add_definitions(
@ -100,23 +99,23 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
endif (CMAKE_BUILD_TYPE MATCHES Debug)
if (NOT WIN32)
install(
install(
TARGETS
${UCHARDET_TARGET}
LIBRARY DESTINATION
${DIR_LIBRARY}
ARCHIVE DESTINATION
${DIR_LIBRARY}
)
)
else (NOT WIN32)
install(
install(
TARGETS
${UCHARDET_TARGET}
RUNTIME DESTINATION
${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION
${DIR_LIBRARY}
)
)
endif (NOT WIN32)
if (UCHARDET_STATIC_TARGET)
@ -138,5 +137,5 @@ install(
include(symbols.cmake)
if (BUILD_BINARY)
add_subdirectory(tools)
add_subdirectory(tools)
endif (BUILD_BINARY)

View File

@ -11,14 +11,13 @@ set(
set (LINK_FLAGS "")
if (APPLE)
# Create a symbols_list file for the darwin linker
# Create a symbols_list file for the darwin linker.
string(REPLACE ";" "\n_" _symbols "${UCHARDET_SYMBOLS}")
set(_symbols_list "${CMAKE_CURRENT_BINARY_DIR}/symbols.list")
file(WRITE ${_symbols_list} "_${_symbols}\n")
set(LINK_FLAGS
"${LINK_FLAGS} -Wl,-exported_symbols_list,'${_symbols_list}'")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
# Create a version script for GNU ld.
set(_symbols "{ global: ${UCHARDET_SYMBOLS}; local: *; };")
@ -26,7 +25,6 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
file(WRITE ${_version_script} "${_symbols}\n")
set(LINK_FLAGS "${LINK_FLAGS} -Wl,--version-script,\"${_version_script}\"")
endif (APPLE)
set_target_properties(

View File

@ -16,8 +16,6 @@ target_link_libraries(
install(
TARGETS
uchardet
RUNTIME
DESTINATION
RUNTIME DESTINATION
${CMAKE_INSTALL_BINDIR}
)

View File

@ -41,9 +41,7 @@ foreach(dir ${dirs})
"${lang}:${charset}" STREQUAL "he:iso-8859-8")
message(STATUS "Skipping test ${lang}:${charset} (known broken)")
else()
add_test(NAME "${lang}:${charset}"
COMMAND uchardet-tests ${file})
add_test(NAME "${lang}:${charset}" COMMAND uchardet-tests ${file})
endif()
endforeach()
endforeach()