diff options
Diffstat (limited to 'c')
-rw-r--r-- | c/CMakeLists.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt new file mode 100644 index 0000000..1bfcac3 --- /dev/null +++ b/c/CMakeLists.txt @@ -0,0 +1,47 @@ +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) + +add_executable(EpisodeBrowser WIN32) +target_sources(EpisodeBrowser PRIVATE + data.cpp + data.h + datalistview.cpp + datalistview.h + debug.cpp + debug.h + episodelistview.cpp + episodelistview.h + ext.cpp + ext.h + layout.cpp + layout.h + listview.cpp + listview.h + main.cpp + resource.h + resource.rc + test.cpp + test.h + util.h + win.cpp + win.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}) + 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() |