Can't compile on Ubuntu Server 18.04
Hello and thanks for this awesome project!

I'm unable to compile OpenMonero on a fresh instance of Ubuntu Server 18.04. I was able to first build Monero (as described in [the instructions](https://github.com/moneroexamples/monero-compilation/blob/master/README.md)), but following the rest of the steps to compile OpenMonero fails at `cmake ..`. Here's the full output:

```
ubuntu@ip:~/openmonero/build$ cmake ..
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- MONERO_DIR: ~/monero
-- Could NOT find MYSQL (missing: REQUIRED_VARS VERSION_VAR MYSQL_VERSION_STRING) 
-- Configuring directory /home/ubuntu/openmonero/build/config
-- Configuring file config.json
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
--   date_time
--   chrono
--   regex
--   serialization
--   program_options
--   date_time
--   atomic
-- MONERO_DIR: ~/monero
-- FindMonero Xmr_CRYPTONOTE_CORE_LIBRARIES /home/ubuntu/monero/build/release/src/cryptonote_core/libcryptonote_core.a
-- FindMonero Xmr_BLOCKCHAIN_DB_LIBRARIES /home/ubuntu/monero/build/release/src/blockchain_db/libblockchain_db.a
-- FindMonero Xmr_CRYPTONOTE_PROTOCOL_LIBRARIES /home/ubuntu/monero/build/release/src/cryptonote_protocol/libcryptonote_protocol.a
-- FindMonero Xmr_CRYPTONOTE_BASIC_LIBRARIES /home/ubuntu/monero/build/release/src/cryptonote_basic/libcryptonote_basic.a
-- FindMonero Xmr_DAEMONIZER_LIBRARIES /home/ubuntu/monero/build/release/src/daemonizer/libdaemonizer.a
-- FindMonero Xmr_BLOCKS_LIBRARIES /home/ubuntu/monero/build/release/src/blocks/libblocks.a
-- FindMonero Xmr_LMDB_LIBRARIES /home/ubuntu/monero/build/release/external/db_drivers/liblmdb/liblmdb.a
-- FindMonero Xmr_RINGCT_LIBRARIES /home/ubuntu/monero/build/release/src/ringct/libringct.a
-- FindMonero Xmr_RINGCT_BASIC_LIBRARIES /home/ubuntu/monero/build/release/src/ringct/libringct_basic.a
-- FindMonero Xmr_COMMON_LIBRARIES /home/ubuntu/monero/build/release/src/common/libcommon.a
-- FindMonero Xmr_MNEMONICS_LIBRARIES /home/ubuntu/monero/build/release/src/mnemonics/libmnemonics.a
-- FindMonero Xmr_EASYLOGGING_LIBRARIES /home/ubuntu/monero/build/release/external/easylogging++/libeasylogging.a
-- FindMonero Xmr_DEVICE_LIBRARIES /home/ubuntu/monero/build/release/src/device/libdevice.a
-- FindMonero Xmr_EPEE_LIBRARIES /home/ubuntu/monero/build/release/contrib/epee/src/libepee.a
-- FindMonero Xmr_CHECKPOINTS_LIBRARIES /home/ubuntu/monero/build/release/src/checkpoints/libcheckpoints.a
-- FindMonero Xmr_VERSION_LIBRARIES /home/ubuntu/monero/build/release/src/libversion.a
-- FindMonero Xmr_CNCRYPTO_LIBRARIES /home/ubuntu/monero/build/release/src/crypto/libcncrypto.a
FOUND Monero_LIBRARIES: cryptonote_core;blockchain_db;cryptonote_protocol;cryptonote_basic;daemonizer;blocks;lmdb;ringct;ringct_basic;common;mnemonics;easylogging;device;epee;checkpoints;version;cncrypto
-- /home/ubuntu/monero/build
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
--   date_time
--   chrono
--   regex
--   serialization
--   program_options
--   atomic
-- Found HIDAPI: /usr/lib/x86_64-linux-gnu/libhidapi-libusb.so  
CMake Error at src/CMakeLists.txt:30 (target_include_monero_directories):
  Unknown CMake command "target_include_monero_directories".


-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/openmonero/build/CMakeFiles/CMakeOutput.log".
See also "/home/ubuntu/openmonero/build/CMakeFiles/CMakeError.log".
```
And here's the content of `CMakeError.log`:

```
ubuntu@ip:~/openmonero/build$ cat CMakeFiles/CMakeError.log
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/ubuntu/openmonero/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_c5e3b/fast"
/usr/bin/make -f CMakeFiles/cmTC_c5e3b.dir/build.make CMakeFiles/cmTC_c5e3b.dir/build
make[1]: Entering directory '/home/ubuntu/openmonero/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_c5e3b.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_c5e3b.dir/CheckSymbolExists.c.o   -c /home/ubuntu/openmonero/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_c5e3b
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c5e3b.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_c5e3b.dir/CheckSymbolExists.c.o  -o cmTC_c5e3b 
CMakeFiles/cmTC_c5e3b.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_c5e3b.dir/build.make:97: recipe for target 'cmTC_c5e3b' failed
make[1]: *** [cmTC_c5e3b] Error 1
make[1]: Leaving directory '/home/ubuntu/openmonero/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_c5e3b/fast' failed
make: *** [cmTC_c5e3b/fast] Error 2

File /home/ubuntu/openmonero/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/ubuntu/openmonero/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_b9c5e/fast"
/usr/bin/make -f CMakeFiles/cmTC_b9c5e.dir/build.make CMakeFiles/cmTC_b9c5e.dir/build
make[1]: Entering directory '/home/ubuntu/openmonero/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_b9c5e.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_b9c5e.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.10/Modules/CheckFunctionExists.c
Linking C executable cmTC_b9c5e
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b9c5e.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_b9c5e.dir/CheckFunctionExists.c.o  -o cmTC_b9c5e -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_b9c5e.dir/build.make:97: recipe for target 'cmTC_b9c5e' failed
make[1]: *** [cmTC_b9c5e] Error 1
make[1]: Leaving directory '/home/ubuntu/openmonero/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_b9c5e/fast' failed
make: *** [cmTC_b9c5e/fast] Error 2
```

I also tried to compile using gcc-8 ([as mentioned here](https://github.com/moneroexamples/openmonero/issues/89#issuecomment-410409361)) and had the same error.


