forked from denisrosset/porta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
39 lines (32 loc) · 1 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
cmake_minimum_required(VERSION 3.12)
project(julia-porta)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:\$ORIGIN/../lib:\$ORIGIN")
if(MSVC)
add_compile_options(/W4)
else()
add_compile_options(-Wall)
endif()
set(JULIA_PORTA_SRC "${PROJECT_SOURCE_DIR}/src")
add_library(porta SHARED
"${JULIA_PORTA_SRC}/arith.c"
"${JULIA_PORTA_SRC}/common.c"
"${JULIA_PORTA_SRC}/four_mot.c"
"${JULIA_PORTA_SRC}/inout.c"
"${JULIA_PORTA_SRC}/largecalc.c"
"${JULIA_PORTA_SRC}/log.c"
"${JULIA_PORTA_SRC}/mp.c"
"${JULIA_PORTA_SRC}/portsort.c"
"${JULIA_PORTA_SRC}/porta.c"
)
target_include_directories(porta PRIVATE "${JULIA_PORTA_SRC}")
add_executable(xporta
"${JULIA_PORTA_SRC}/main.c"
)
target_link_libraries(xporta PRIVATE porta)
target_include_directories(xporta PRIVATE "${JULIA_PORTA_SRC}")
add_executable(valid
"${JULIA_PORTA_SRC}/valid.c"
)
target_link_libraries(valid PRIVATE porta)
target_include_directories(valid PRIVATE "${JULIA_PORTA_SRC}")
install(TARGETS porta xporta valid)