build: build lib/common as static library
This commit is contained in:
parent
6f022ff700
commit
e38a8e6b15
1 changed files with 5 additions and 7 deletions
|
|
@ -1,11 +1,9 @@
|
||||||
# SPDX-FileCopyrightText: (C) 2024 Chris Rizzitello <sithlord48@gmail.com>
|
# SPDX-FileCopyrightText: (C) 2024 - 2025 Chris Rizzitello <sithlord48@gmail.com>
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
|
|
||||||
|
|
||||||
configure_file(constants.h.in constants.h @ONLY)
|
configure_file(constants.h.in constants.h @ONLY)
|
||||||
|
|
||||||
add_library(common INTERFACE
|
add_library(common STATIC
|
||||||
common.h
|
common.h
|
||||||
version.h
|
version.h
|
||||||
IInterface.h
|
IInterface.h
|
||||||
|
|
@ -21,9 +19,9 @@ add_library(common INTERFACE
|
||||||
stdvector.h
|
stdvector.h
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/constants.h
|
${CMAKE_CURRENT_BINARY_DIR}/constants.h
|
||||||
)
|
)
|
||||||
|
set_target_properties(common PROPERTIES LINKER_LANGUAGE CXX)
|
||||||
target_link_libraries(common INTERFACE Qt6::Core)
|
target_link_libraries(common PUBLIC Qt6::Core)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
target_sources(common INTERFACE MacOSXPrecomp.h)
|
target_sources(common PUBLIC MacOSXPrecomp.h)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue