-
Notifications
You must be signed in to change notification settings - Fork 15
/
CMakeLists.txt
77 lines (46 loc) · 1.37 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
#pcbmodelgen
cmake_minimum_required(VERSION 3.5)
project(pcbmodelgen)
#Dependencies
find_path(TINYXML2_INCLUDE_DIR
NAMES tinyxml2.h
PATHS ${TINYXML2_PKGCONF_INCLUDE_DIRS}
)
find_library(TINYXML2_LIBRARY
NAMES tinyxml2
PATHS ${TINYXML2_PKGCONF_LIBRARY_DIRS}
)
find_path(TCLAP_INCLUDE_DIR
NAMES tclap
PATHS ${TCLAP_PKGCONF_INCLUDE_DIRS}
)
message("TinyXML2 include path: " ${TINYXML2_INCLUDE_DIR})
message("TinyXML2 library: " ${TINYXML2_LIBRARY})
message("TCLAP include path: " ${TCLAP_INCLUDE_DIR})
if((TINYXML2_INCLUDE_DIR MATCHES TINYXML2_INCLUDE_DIR-NOTFOUND) OR (TINYXML2_LIBRARY MATCHES TINYXML2_LIBRARY-NOTFOUND))
message("TinyXML2 not found")
endif()
if(TCLAP_INCLUDE_DIR MATCHES TCLAP_INCLUDE_DIR-NOTFOUND)
message("TCLAP library not found")
endif()
set( SRC
source/ems.cpp
source/ems_prims.cpp
source/kicadtoems_config.cpp
source/kicadtoems_ui.cpp
source/main.cpp
source/srecs.cpp
source/json/jsoncpp.cpp
)
SET( INCLUDE_DIRS
source/
${TINYXML2_INCLUDE_DIR}
${TCLAP_INCLUDE_DIR}
)
include_directories(${INCLUDE_DIRS})
SET(GCC_COVERAGE_COMPILE_FLAGS "-std=c++11")
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" )
add_executable(pcbmodelgen ${SRC})
target_link_libraries(pcbmodelgen ${TINYXML2_LIBRARY})
install(TARGETS pcbmodelgen
RUNTIME DESTINATION bin)