Skip to content

Commit f3e5578

Browse files
committed
Moving build to Ubuntu 16.04 LTS
1 parent 8d53453 commit f3e5578

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

CMakeLists.txt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.0)
1+
cmake_minimum_required(VERSION 3.7)
22
message(STATUS "Running cmake version ${CMAKE_VERSION}")
33

44
project(InpxCreator)
@@ -14,7 +14,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
1414

1515
# Project version number
1616
set(PRJ_VERSION_MAJOR 9)
17-
set(PRJ_VERSION_MINOR 41)
17+
set(PRJ_VERSION_MINOR 42)
1818
configure_file("${PROJECT_SOURCE_DIR}/cmake/version.h.in" "${PROJECT_BINARY_DIR}/version.h")
1919
include_directories("${PROJECT_BINARY_DIR}")
2020

@@ -44,14 +44,13 @@ else()
4444
endif()
4545
message(STATUS "Destination directory: ${DEST_DIR}")
4646

47-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
4847
set(BUILD_SHARED_LIBS OFF)
49-
if(UNIX)
50-
# STATIC LINK set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++")
51-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
52-
else()
53-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
54-
endif()
48+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
49+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
50+
# if(UNIX)
51+
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -static-libgcc -static-libstdc++")
52+
# endif()
53+
5554
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
5655
message(STATUS "** Debug mode")
5756
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -D_XML_DEBUG")
@@ -64,12 +63,12 @@ find_package(Git REQUIRED)
6463

6564
set(Boost_USE_STATIC_LIBS ON)
6665
set(Boost_USE_STATIC_RUNTIME ON)
67-
find_package(Boost 1.63.0 REQUIRED COMPONENTS "date_time" "program_options" "filesystem")
66+
find_package(Boost 1.58.0 REQUIRED COMPONENTS "date_time" "program_options" "filesystem")
6867
find_package(Threads)
6968
if(DEFINED ENV{MYSQL_PROPER})
7069
find_package(MySQL 5.7.17 REQUIRED EXACT)
7170
else()
72-
find_package(MariaDB 10.1.26 REQUIRED)
71+
find_package(MariaDB 10.1.26 REQUIRED EXACT)
7372
endif()
7473
find_package(ZLIB REQUIRED)
7574
find_package(EXPAT REQUIRED)
@@ -92,13 +91,14 @@ set(SRCS_LIB2INPX lib2inpx/util.cpp lib2inpx/lib2inpx.cpp)
9291
add_executable(lib2inpx ${SRCS_LIB2INPX})
9392
if(UNIX)
9493
set(ADD_LIBS "${CMAKE_THREAD_LIBS_INIT} -lm -lrt -ldl -lcrypt -laio")
94+
if(ICONV_LIBRARIES MATCHES "libc")
95+
target_link_libraries(lib2inpx minizip ${Boost_LIBRARIES} ${MYSQL_LIBRARIES} ${ZLIB_LIBRARIES} ${EXPAT_LIBRARIES} ${ADD_LIBS})
96+
else()
97+
target_link_libraries(lib2inpx minizip ${Boost_LIBRARIES} ${MYSQL_LIBRARIES} ${ZLIB_LIBRARIES} ${EXPAT_LIBRARIES} ${ICONV_LIBRARIES} ${ADD_LIBS})
98+
endif()
99+
else()
100+
target_link_libraries(lib2inpx minizip ${Boost_LIBRARIES} ${MYSQL_LIBRARIES} ${ZLIB_LIBRARIES} ${EXPAT_LIBRARIES} ${ICONV_LIBRARIES})
95101
endif()
96-
target_link_libraries(lib2inpx minizip ${Boost_LIBRARIES} ${MYSQL_LIBRARIES} ${ZLIB_LIBRARIES} ${EXPAT_LIBRARIES} ${ICONV_LIBRARIES} ${ADD_LIBS})
97-
# STATIC LINK
98-
#if(UNIX)
99-
# set_target_properties(lib2inpx PROPERTIES LINK_SEARCH_START_STATIC 1)
100-
# set_target_properties(lib2inpx PROPERTIES LINK_SEARCH_END_STATIC 1)
101-
#endif()
102102

103103
install(FILES ${PROJECT_BINARY_DIR}/history.txt DESTINATION ${DEST_DIR} CONFIGURATIONS Release)
104104
FILE(GLOB files "misc/*")

get-maria.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/bin/bash -e
22

3+
echo "10.1.26 seems to be the last version supporting libmysqld.a"
4+
35
ver_major=10.1
46
ver_minor=26
57

68
declare -A checkmap
7-
8-
from_url="https://downloads.mariadb.org/interstitial"
9+
from_url="https://downloads.mariadb.com/MariaDB"
910

1011
ARCH_INSTALLS="${ARCH_INSTALLS:-win32 win64 linux}"
1112

@@ -40,6 +41,9 @@ for _mingw in ${ARCH_INSTALLS}; do
4041

4142
echo "Processing ${arch}..."
4243
if [ ! -f ${file} ]; then
44+
echo
45+
echo "--> ${from_url}/mariadb-${ver_major}.${ver_minor}/${packagedir}/${file}"
46+
echo
4347
curl -L -O ${from_url}/mariadb-${ver_major}.${ver_minor}/${packagedir}/${file}
4448
else
4549
echo "Have ${file} locally."
@@ -65,7 +69,7 @@ for _mingw in ${ARCH_INSTALLS}; do
6569
for dll in *.dll; do
6670
echo "Creating Windows export library for ${dll}"
6771
gendef -a ${dll}
68-
dlltool -d ${dll%.*}.def -l ${dll}.a -k
72+
${prefix}-w64-mingw32-dlltool -d ${dll%.*}.def -l ${dll}.a -k
6973
rm ${dll%.*}.def
7074
done
7175
)

0 commit comments

Comments
 (0)