Two small CMakeLists fixes (as discussed) (#1420)
* include (GNUInstallDirs) before using ${CMAKE_INSTALL_LIBDIR} While here, trim some needless whitespace. * Do not explicitly set APP_REVISION to an empty string This allows to pass it on the command line when building from GitHub-generated release tarballs which lack any Git metadata.
This commit is contained in:
parent
b6f2f41677
commit
09ac0f05ef
2 changed files with 9 additions and 12 deletions
|
@ -245,8 +245,6 @@ if(REVISION_FROM_GIT AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||||
)
|
)
|
||||||
|
|
||||||
message(STATUS "Detected git revision: '${APP_REVISION}'.")
|
message(STATUS "Detected git revision: '${APP_REVISION}'.")
|
||||||
else()
|
|
||||||
set(APP_REVISION "")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT NO_LITE)
|
if(NOT NO_LITE)
|
||||||
|
|
|
@ -498,20 +498,12 @@ add_library(rssguard SHARED ${SOURCES} ${QM_FILES})
|
||||||
if(FORCE_BUNDLE_ICONS)
|
if(FORCE_BUNDLE_ICONS)
|
||||||
target_compile_definitions(rssguard
|
target_compile_definitions(rssguard
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
|
||||||
FORCE_BUNDLE_ICONS
|
FORCE_BUNDLE_ICONS
|
||||||
)
|
)
|
||||||
|
|
||||||
message(STATUS "Forcibly bundling icon themes.")
|
message(STATUS "Forcibly bundling icon themes.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add specific definitions.
|
|
||||||
target_compile_definitions(rssguard
|
|
||||||
PRIVATE
|
|
||||||
RSSGUARD_DLLSPEC=Q_DECL_EXPORT
|
|
||||||
RSSGUARD_LIBDIR="${CMAKE_INSTALL_LIBDIR}"
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(rssguard
|
target_include_directories(rssguard
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
@ -643,6 +635,13 @@ elseif(APPLE)
|
||||||
set(HEADERS_FOLDER "Contents/Resources/Include")
|
set(HEADERS_FOLDER "Contents/Resources/Include")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Add specific definitions.
|
||||||
|
target_compile_definitions(rssguard
|
||||||
|
PRIVATE
|
||||||
|
RSSGUARD_DLLSPEC=Q_DECL_EXPORT
|
||||||
|
RSSGUARD_LIBDIR="${CMAKE_INSTALL_LIBDIR}"
|
||||||
|
)
|
||||||
|
|
||||||
# Install public headers.
|
# Install public headers.
|
||||||
set(HEADERS_ROOT "${PROJECT_SOURCE_DIR}/src/librssguard")
|
set(HEADERS_ROOT "${PROJECT_SOURCE_DIR}/src/librssguard")
|
||||||
file(GLOB_RECURSE HEADER_FILES RELATIVE ${HEADERS_ROOT} "*.h")
|
file(GLOB_RECURSE HEADER_FILES RELATIVE ${HEADERS_ROOT} "*.h")
|
||||||
|
|
Loading…
Add table
Reference in a new issue