Skip to content

Commit

Permalink
FetchContent orient instead of symlink
Browse files Browse the repository at this point in the history
v0.3.1
  • Loading branch information
cxxsucks committed Jan 17, 2023
1 parent 26adfcb commit 2e731fc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
24 changes: 16 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
cmake_minimum_required(VERSION 3.5)

project(seev VERSION 0.3.0 LANGUAGES CXX)

add_subdirectory(orient)
add_subdirectory(assets)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/orient/include)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
project(seev VERSION 0.3.1 LANGUAGES CXX)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
Expand All @@ -16,6 +10,19 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets LinguistTools)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools)
add_subdirectory(previewer)
add_subdirectory(assets)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

option(SEEV_SYSTEM_ORIENT "Use System orient Library" OFF)
if (NOT SEEV_SYSTEM_ORIENT)
include(FetchContent)
FetchContent_Declare(orient
GIT_REPOSITORY https://github.com/cxxsucks/orient
GIT_TAG master)
FetchContent_MakeAvailable(orient)
else(NOT SEEV_SYSTEM_ORIENT)
find_package(orie REQUIRED)
endif(NOT SEEV_SYSTEM_ORIENT)

set(seev_src
main.cc
Expand Down Expand Up @@ -76,7 +83,8 @@ set_target_properties(seev PROPERTIES
WIN32_EXECUTABLE TRUE
)

target_link_libraries(seev PRIVATE Qt${QT_VERSION_MAJOR}::Widgets orie previewer)
target_link_libraries(seev PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets orie::orie previewer)

if(${QT_VERSION_MAJOR} EQUAL 6)
qt_finalize_executable(seev)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ Configure Options:
- `ORIE_LINK_STATIC`: Statically link orient executable
- `ORIE_SYSTEM_RAPIDFUZZ`: Use System rapidfuzz Library (header only)

> `rapidfuzz` has some issues with building as sub project so
> `SEEV_SYSTEM_ORIENT` is not stable (yet).
Replace the `OPTION` below with your enabled options, and run the
following commands:

Expand Down
1 change: 0 additions & 1 deletion orient

This file was deleted.

0 comments on commit 2e731fc

Please sign in to comment.