-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMakeLists.txt
65 lines (58 loc) · 1.69 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
cmake_minimum_required(VERSION 3.1)
project(PCBAPP)
include(ExternalProject)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(THREADS_PREFER_PTHREAD_FLAG ON)
set(ALLOW_DUPLICATE_CUSTOM_TARGETS TRUE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pthread -O3 -fpermissive -fPIC")
set(CMAKE_CXX_FLAGS_DEBUG "-g -ggdb")
find_package(Boost REQUIRED)
set(SWIG_EXECUTABLE "swig")
#find_package(Swig REQUIRED)
#set(SWIG_EXECUTABLE "/usr/local/bin/swig")
#find_package( PythonInterp 2.7 REQUIRED )
find_package( PythonInterp 3 REQUIRED )
#find_package( PythonLibs 2.7 REQUIRED )
find_package( PythonLibs 3 REQUIRED )
include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARYDIR})
set(APP_HOME ${PROJECT_SOURCE_DIR} )
set(KICADPARSER_HOME
${PROJECT_SOURCE_DIR}/module/KicadParser
)
set(PCBPLACER_HOME
${PROJECT_SOURCE_DIR}/module/SA-PCB
)
set(PCBROUTER_HOME
${PROJECT_SOURCE_DIR}/module/PcbRouter
)
ExternalProject_Add(pcbplacer
PREFIX ${PCBPLACER_HOME}
SOURCE_DIR ${PCBPLACER_HOME}
BINARY_DIR ${PCBPLACER_HOME}/bin
INSTALL_DIR ${PCBPLACER_HOME}/bin
DOWNLOAD_COMMAND ""
INSTALL_COMMAND ""
)
ExternalProject_Add(pcbrouter
PREFIX ${PCBROUTER_HOME}
SOURCE_DIR ${PCBROUTER_HOME}
BINARY_DIR ${PCBROUTER_HOME}/bin
INSTALL_DIR ${PCBROUTER_HOME}/bin
DOWNLOAD_COMMAND ""
INSTALL_COMMAND ""
)
ExternalProject_Add(kicadparser
PREFIX ${KICADPARSER_HOME}
SOURCE_DIR ${KICADPARSER_HOME}
BINARY_DIR ${KICADPARSER_HOME}/bin
INSTALL_DIR ${KICADPARSER_HOME}/bin
DOWNLOAD_COMMAND ""
INSTALL_COMMAND ""
)
add_custom_command(OUTPUT so.stamp
POST_BUILD
COMMAND /bin/sh ${PROJECT_SOURCE_DIR}/create_shared_objs.sh
)