Skip to content

Commit

Permalink
cmake/qrc fixes
Browse files Browse the repository at this point in the history
Fix resources after adding the ui library.
  • Loading branch information
rodlie committed May 3, 2024
1 parent 45d5bc2 commit 8863e61
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
12 changes: 0 additions & 12 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ add_definitions(-DPROJECT_VERSION="${PROJECT_VERSION}")

if(${LINUX_DEPLOY})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
add_definitions(-DLINUX_DEPLOY)
endif()
if(${WIN_DEPLOY})
add_definitions(-DWIN_DEPLOY)
endif()

option(USE_SKIA_SYSTEM_LIBS "Use skia (third-party) system libraries on Linux" ON)
Expand Down Expand Up @@ -264,14 +260,6 @@ set(
${CMAKE_CURRENT_SOURCE_DIR}/../scripts/easing.qrc
)

if(${LINUX_DEPLOY})
list(APPEND RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../docs/docs_lin.qrc)
elseif(${WIN_DEPLOY})
list(APPEND RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../docs/docs_win.qrc)
else()
list(APPEND RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../docs/docs.qrc)
endif()

add_executable(
${PROJECT_NAME}
${ICON_FILE}
Expand Down
7 changes: 7 additions & 0 deletions src/cmake/friction-common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
option(LINUX_DEPLOY "Linux Deploy" OFF)
option(WIN_DEPLOY "Windows Deploy" OFF)

if(${LINUX_DEPLOY})
add_definitions(-DLINUX_DEPLOY)
endif()
if(${WIN_DEPLOY})
add_definitions(-DWIN_DEPLOY)
endif()

if(UNIX AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
message(FATAL_ERROR "Only Clang is supported.")
elseif(WIN32 AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
Expand Down
12 changes: 10 additions & 2 deletions src/ui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,18 @@ set(
widgets/wrappernode.h
)

if(${LINUX_DEPLOY})
list(APPEND RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../docs/docs_lin.qrc)
elseif(${WIN_DEPLOY})
list(APPEND RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../docs/docs_win.qrc)
else()
list(APPEND RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../docs/docs.qrc)
endif()

if(NOT WIN32)
add_library(${PROJECT_NAME} STATIC ${HEADERS} ${SOURCES})
add_library(${PROJECT_NAME} STATIC ${HEADERS} ${SOURCES} ${RESOURCES})
else()
add_library(${PROJECT_NAME} SHARED ${HEADERS} ${SOURCES})
add_library(${PROJECT_NAME} SHARED ${HEADERS} ${SOURCES} ${RESOURCES})
endif()

set_target_properties(
Expand Down

0 comments on commit 8863e61

Please sign in to comment.