forked from Nikorag/cpp-steam-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
46 lines (37 loc) · 1.27 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
cmake_minimum_required(VERSION 3.14)
project(cpp-steam-tools LANGUAGES CXX)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Gui)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui)
add_library(cpp-steam-tools SHARED
include/cpp-steam-tools_global.h
src/steamtools.cpp
include/steamtools.h
src/steamshortcutentry.cpp
include/steamshortcutentry.h
include/crc.h
include/vdf_parser.hpp
include/vdfstatemachine.h
src/vdfstatemachine.cpp
)
target_include_directories(cpp-steam-tools
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:src>
)
target_link_libraries(cpp-steam-tools PRIVATE Qt${QT_VERSION_MAJOR}::Gui)
target_compile_definitions(cpp-steam-tools PRIVATE CPPSTEAMTOOLS_LIBRARY)
install(TARGETS cpp-steam-tools
EXPORT SteamToolsTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
install(DIRECTORY include/ DESTINATION include)