-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
57 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
cmake_minimum_required(VERSION 3.24)
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
include(FetchContent)
FetchContent_Declare(
vcpkg
GIT_REPOSITORY https://github.com/microsoft/vcpkg.git
GIT_TAG master
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(vcpkg)
set(CMAKE_TOOLCHAIN_FILE
${vcpkg_SOURCE_DIR}/scripts/buildsystems/vcpkg.cmake
CACHE FILEPATH "Vcpkg toolchain file"
)
set(VCPKG_ROOT_DIR ${vcpkg_SOURCE_DIR} CACHE PATH "Vcpkg Root Directory")
endif()
add_custom_target(UpdateVcpkgBaseline
${VCPKG_ROOT_DIR}/vcpkg x-update-baseline
)
project(explore-verilog VERSION 1.1.0)
find_package(nyu-cmake CONFIG REQUIRED)
add_library(compressors INTERFACE)
add_subdirectory(rtl)
if(NYU_BUILD_TESTS)
enable_testing()
add_subdirectory(dv)
endif()
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
nyu_install_sv(
EXPORT exploreVerilogTargets
TARGETS compressors
NAMESPACE nyu::
EXPORT_DEST ${CMAKE_INSTALL_DATADIR}/explore-verilog
SV_DEST ${CMAKE_INSTALL_DATADIR}/explore-verilog/rtl
)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/explore-verilog-config-version.cmake
COMPATIBILITY ExactVersion
ARCH_INDEPENDENT
)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/explore-verilog-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/explore-verilog-config-version.cmake
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/explore-verilog
)