cmake_minimum_required(VERSION 3.10) project(EpisodeBrowser) set(MSVC_EXT_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../x/h) set(MSVC_EXT_LINK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../x/l) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) add_compile_definitions(UNICODE _UNICODE) if(NOT CMAKE_CONFIGURATION_TYPES MATCHES "Release") add_compile_definitions(_DEBUG NDEBUG) endif() add_executable(EpisodeBrowser WIN32) target_sources(EpisodeBrowser PRIVATE data.cpp data.h datalistview.cpp datalistview.h debug.cpp debug.h drag.cpp drag.h episodelistview.cpp episodelistview.h err.cpp err.h ext.cpp ext.h listview.cpp listview.h main.cpp res.h res.rc test.cpp test.h util.h win32.cpp win32.h window.h ) if (CMAKE_GENERATOR MATCHES "Visual Studio") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO") target_compile_options(EpisodeBrowser PRIVATE /wd26451 /wd6385) target_include_directories(EpisodeBrowser PUBLIC ${MSVC_EXT_INCLUDE_DIR}) find_library(LIBXML2 libxml2 HINTS ${MSVC_EXT_LINK_DIR}/${CMAKE_GENERATOR_PLATFORM}) target_link_libraries(EpisodeBrowser comctl32 wininet ${LIBXML2}) else() target_include_directories(EpisodeBrowser PUBLIC C:/msys64/mingw64/include/libxml2) target_link_libraries(EpisodeBrowser stdc++ comctl32 wininet libxml2) endif()