version 0.5.0_alpha
git-svn-id: svn://db.shs.com.ru/pip@8 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
project(pip)
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
include(CheckFunctionExists)
|
||||
@@ -28,13 +29,13 @@ string(SUBSTRING ${VERSION_REVISION} 0 ${SL} VERSION_REVISION)
|
||||
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
||||
set(SOVERSION ${VERSION})
|
||||
message(STATUS "Building PIP version ${VERSION}${VERSION_SUFFIX}")
|
||||
file(WRITE "src/pip_version_str.h" "#define __PIP_VERSION_STR__ \"${VERSION}${VERSION_SUFFIX}\"\n")
|
||||
file(WRITE "src/pip_version_str.h" "// This file was generated by PIP CMake, don`t edit it!\n#define __PIP_VERSION_STR__ \"${VERSION}${VERSION_SUFFIX}\"\n")
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
set(LIBS)
|
||||
|
||||
|
||||
# Sources
|
||||
set(PIP_FOLDERS "." "code" "containers" "core" "io" "math" "system" "thread")
|
||||
set(PIP_FOLDERS "." "core" "containers" "thread" "system" "io" "console" "math" "code")
|
||||
include_directories("src")
|
||||
foreach(F ${PIP_FOLDERS})
|
||||
include_directories("src/${F}")
|
||||
@@ -132,11 +133,11 @@ if (${WIN32})
|
||||
else ()
|
||||
set(${CMAKE_CXX_FLAGS} "-O2")
|
||||
if (DEFINED ENV{QNX_HOST})
|
||||
list(APPEND LIBS socket)
|
||||
list(APPEND LIBS socket dl)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-32")
|
||||
add_library(pip STATIC ${CPPS})
|
||||
else ()
|
||||
list(APPEND LIBS pthread)
|
||||
list(APPEND LIBS pthread dl)
|
||||
if (NOT APPLE)
|
||||
list(APPEND LIBS rt)
|
||||
endif()
|
||||
@@ -152,7 +153,7 @@ set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
# Test program
|
||||
#find_package(Qt4 REQUIRED)
|
||||
#include_directories(${QT_INCLUDES})
|
||||
add_executable(pip_test "main.cpp")
|
||||
add_executable(pip_test "main.cpp" "ccm_kbd.cpp")
|
||||
target_link_libraries(pip_test pip)# ${QT_QTCORE_LIBRARY})
|
||||
#target_link_libraries(pip_test pip)
|
||||
|
||||
@@ -177,7 +178,7 @@ if (DEFINED LIB)
|
||||
#list(APPEND HDRS "pip.h.gch")
|
||||
install(FILES "FindPIP.cmake" DESTINATION ${CMAKE_ROOT}/Modules)
|
||||
else ()
|
||||
install(TARGETS pip DESTINATION bin)
|
||||
install(TARGETS pip DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
message(STATUS "Install to local \"bin\"")
|
||||
endif ()
|
||||
|
||||
@@ -185,3 +186,4 @@ endif ()
|
||||
add_subdirectory("utils/system_test")
|
||||
add_subdirectory("utils/remote_console")
|
||||
add_subdirectory("utils/code_model_generator")
|
||||
add_subdirectory("utils/system_daemon")
|
||||
|
||||
Reference in New Issue
Block a user