Skip to content

Commit

Permalink
Cmake fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingwie Phoenix committed Dec 21, 2014
1 parent 7ae4c51 commit b38edf1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.11)
cmake_minimum_required(VERSION 2.8.12)
project(ObjectScript)

# This is the base of ObjectScript.
Expand Down Expand Up @@ -101,7 +101,7 @@ IF(FORCE32)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
ELSE()
# We build for 64 bit just as we should.
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
endif()

find_package(Threads)
Expand Down Expand Up @@ -139,7 +139,6 @@ endif()

# SoCi
# SoCi is required and can additionally be built.
include(FindSoci.cmake)
if(NOT BUILD_SOCI)
find_package(Soci)
if(SOCI_FOUND)
Expand Down Expand Up @@ -198,7 +197,7 @@ endif()
if(USE_ZLIB)
list(APPEND EXT_SRC src/ext-zlib/os-zlib.cpp)
list(APPEND EXT_SRC src/ext-zlib/os-zlib.h)
find_package(zlib)
find_package(ZLIB)
if(ZLIB_FOUND)
include_directories(${SQLITE3_INCLUDE_DIR})
else()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 5 additions & 4 deletions FindSoci.cmake → cmake/FindSoci.cmake
Expand Up @@ -44,11 +44,12 @@ SET(SOCI_INCLUDE_DIRS ${SOCI_INCLUDE_DIR})
#
### SECOND STEP: Find the soci core library. Respect LIB_SUFFIX
#
set(_SOCI_HINTS ${SOCI_INCLUDE_DIR}/../.. /usr/local/lib /usr/local/lib64 /usr/local/lib32)
FIND_LIBRARY(
SOCI_LIBRARY
NAMES soci_core
HINTS ${SOCI_INCLUDE_DIR}/..
PATH_SUFFIXES lib${LIB_SUFFIX})
HINTS ${_SOCI_HINTS}
)
MARK_AS_ADVANCED(SOCI_LIBRARY)

GET_FILENAME_COMPONENT(SOCI_LIBRARY_DIR ${SOCI_LIBRARY} PATH)
Expand All @@ -65,8 +66,8 @@ IF(SOCI_INCLUDE_DIR AND SOCI_LIBRARY)
FIND_LIBRARY(
SOCI_${plugin}_PLUGIN
NAMES soci_${plugin}
HINTS ${SOCI_INCLUDE_DIR}/..
PATH_SUFFIXES lib${LIB_SUFFIX})
HINTS ${_SOCI_HINTS}
)
MARK_AS_ADVANCED(SOCI_${plugin}_PLUGIN)

IF(SOCI_${plugin}_PLUGIN)
Expand Down

0 comments on commit b38edf1

Please sign in to comment.