diff options
author | ComradeCrow <comradecrow@vivaldi.net> | 2023-04-20 00:16:53 -0700 |
---|---|---|
committer | ComradeCrow <comradecrow@vivaldi.net> | 2023-04-20 00:16:53 -0700 |
commit | 7ba81cbe9809cfb68bee85bc6f79e798ef7b05ce (patch) | |
tree | 1daea06ae7663adb6ae4a56a90bc95fea9ea3c57 /CMakeLists.txt | |
parent | bc48d6f7bf88d89846d9eabffc67cedeb312c273 (diff) | |
download | ytcpp-7ba81cbe9809cfb68bee85bc6f79e798ef7b05ce.tar.gz |
start basic database support
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f3dda8a..c3186df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,8 +42,19 @@ add_subdirectory(extern/pybind11) find_package(Ytdlp REQUIRED RUNTIME) +if(UNIX) + file(TO_CMAKE_PATH "$ENV{HOME}/.local/share/${PROJECT_NAME}/" DEF_APPDATA) +elseif(WIN32) + file(TO_CMAKE_PATH "$ENV{LOCALAPPDATA}\\${PROJECT_NAME}\\" DEF_APPDATA) +else() + message(SEND_ERROR "OS not recognized !") + file(TO_CMAKE_PATH "./data" DEF_APPDATA) +endif() + + add_executable(${PROJECT_NAME} src/main.cpp src/tui.cpp src/invapi.cpp src/YtdlpWrapper.cpp src/sqliteinterface.cpp) target_include_directories(${PROJECT_NAME} PRIVATE src) +target_compile_definitions(${PROJECT_NAME} PRIVATE DEF_APPDATA="${DEF_APPDATA}") target_link_libraries(${PROJECT_NAME} PRIVATE cpr::cpr |