-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
39 lines (28 loc) · 994 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
cmake_minimum_required(VERSION 3.10)
project(OpenPilot VERSION 1.0)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(SOURCES
main.cpp
serial.cc
)
set(HEADERS
OpenPilot.h # Your project headers
serial.h
)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# Specify the static library you want to link against
set(STATIC_LIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}serial.lib") # Adjust the path to where serial.lib is located
set(STATIC_LIB_NAME "serial")
# Add the imported library
add_library(${STATIC_LIB_NAME} STATIC IMPORTED)
set_target_properties(${STATIC_LIB_NAME} PROPERTIES IMPORTED_LOCATION ${STATIC_LIB_PATH})
# Add the main executable
add_executable(OpenPilot ${SOURCES})
# Link the static library to your executable
target_link_libraries(OpenPilot ${STATIC_LIB_NAME})
# CPack configuration
set(CPACK_PROJECT_NAME "OpenPilot")
set(CPACK_PROJECT_VERSION "1.0")
set(CPACK_GENERATOR "ZIP") # Choose your desired package format
include(CPack)