restructured repository based on following standards:

https://github.com/HW-Core/directory-structure
This commit is contained in:
Yehonal
2016-07-08 23:58:11 +02:00
parent eda1171939
commit 9fd22872c0
2536 changed files with 433 additions and 2158 deletions

View File

@@ -0,0 +1,23 @@
# from cmake wiki
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
STRING(REGEX REPLACE "\n" ";" files "${files}")
FOREACH(file ${files})
MESSAGE(STATUS "Uninstalling \"${file}\"")
IF(EXISTS "${file}")
EXEC_PROGRAM(
"@CMAKE_COMMAND@" ARGS "-E remove \"${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
IF("${rm_retval}" STREQUAL 0)
ELSE("${rm_retval}" STREQUAL 0)
MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"")
ENDIF("${rm_retval}" STREQUAL 0)
ELSE(EXISTS "${file}")
MESSAGE(STATUS "File \"${file}\" does not exist.")
ENDIF(EXISTS "${file}")
ENDFOREACH(file)

View File

@@ -0,0 +1,5 @@
# set installation prefix
if( PREFIX )
set(CMAKE_INSTALL_PREFIX "${PREFIX}")
endif()

View File

@@ -0,0 +1,44 @@
# Package overloads - Linux
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
if (NOT NOJEM)
set(JEMALLOC_LIBRARY "jemalloc")
message(STATUS "UNIX: Using jemalloc")
endif()
endif()
# set default configuration directory
if( NOT CONF_DIR )
set(CONF_DIR ${CMAKE_INSTALL_PREFIX}/etc)
message(STATUS "UNIX: Using default configuration directory")
endif()
# set default library directory
if( NOT LIBSDIR )
set(LIBSDIR ${CMAKE_INSTALL_PREFIX}/lib)
message(STATUS "UNIX: Using default library directory")
endif()
# configure uninstaller
configure_file(
"${CMAKE_SOURCE_DIR}/src/cmake/platform/cmake_uninstall.in.cmake"
"${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
@ONLY
)
message(STATUS "UNIX: Configuring uninstall target")
# create uninstaller target (allows for using "make uninstall")
add_custom_target(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
)
message(STATUS "UNIX: Created uninstall target")
message(STATUS "UNIX: Detected compiler: ${CMAKE_C_COMPILER}")
if(CMAKE_C_COMPILER MATCHES "gcc" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
include(${CMAKE_SOURCE_DIR}/src/cmake/compiler/gcc/settings.cmake)
elseif(CMAKE_C_COMPILER MATCHES "icc")
include(${CMAKE_SOURCE_DIR}/src/cmake/compiler/icc/settings.cmake)
elseif(CMAKE_C_COMPILER MATCHES "clang")
include(${CMAKE_SOURCE_DIR}/src/cmake/compiler/clang/settings.cmake)
else()
add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"')
endif()

View File

@@ -0,0 +1,32 @@
# Platform-specfic options
option(USE_MYSQL_SOURCES "Use included MySQL-sources to build libraries" 1)
# Package overloads
set(ACE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/modules/dep/acelite)
set(ACE_LIBRARY "ace")
set(BZIP2_LIBRARIES "bzip2")
set(ZLIB_LIBRARIES "zlib")
if( USE_MYSQL_SOURCES )
set(MYSQL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/modules/dep/mysqllite/include)
set(MYSQL_LIBRARY "libmysql")
set( MYSQL_FOUND 1 )
message(STATUS "Using supplied MySQL sources")
endif()
# check the CMake preload parameters (commented out by default)
# overload CMAKE_INSTALL_PREFIX if not being set properly
#if( WIN32 )
# if( NOT CYGWIN )
# if( NOT CMAKE_INSTALL_PREFIX )
# set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/bin")
# endif()
# endif()
#endif()
if ( MSVC )
include(${CMAKE_SOURCE_DIR}/src/cmake/compiler/msvc/settings.cmake)
elseif ( MINGW )
include(${CMAKE_SOURCE_DIR}/src/cmake/compiler/mingw/settings.cmake)
endif()