-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
28 lines (21 loc) · 955 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cmake_minimum_required(VERSION 2.8)
set(CMAKE_BUILD_TYPE "Release")
INCLUDE_DIRECTORIES( "$ENV{HOME}/include")
LINK_DIRECTORIES( "$ENV{HOME}/lib")
SET(CMAKE_CXX_FLAGS "-w -g -O3")
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
#Advection library
project(Advection)
file( GLOB_RECURSE source_files sources/*)
file( GLOB_RECURSE header_files sources/*.h)
ADD_LIBRARY( Advection SHARED ${source_files})
find_library( Commons NAMES Commons HINTS "$ENV{HOME}/lib")
target_link_libraries( Advection ${Commons})
INSTALL( TARGETS Advection LIBRARY DESTINATION "$ENV{HOME}/lib")
INSTALL( FILES ${header_files} DESTINATION "$ENV{HOME}/include")
#Executable
project(main)
add_executable( advect sources/advect.c)
target_link_libraries( advect Commons Advection)
INSTALL( TARGETS advect RUNTIME DESTINATION "$ENV{HOME}/bin")