]> Some of my projects - aniplayer.git/commitdiff
Update cmake for INTERFACE LIBRARY feature
authorAPTX <marek321@gmail.com>
Mon, 21 Feb 2022 13:17:19 +0000 (22:17 +0900)
committerAPTX <marek321@gmail.com>
Mon, 21 Feb 2022 13:17:19 +0000 (22:17 +0900)
CMakeLists.txt
pluginapi/CMakeLists.txt

index c27aec8f1569142356012bc3f0dbf546307c9251..09e5b9cb21c250ceddc35a003bd15796fa2a4892 100644 (file)
@@ -1,4 +1,5 @@
-cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
+# 3.19 Due to interface LIBRARY
+cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
 include(FeatureSummary)
 include(CMakeDependentOption)
 
index c25990bdf19a4cc2ac55a8db324f262c3c59218a..7522ec138a5f0c4e739b1c09c6132c3ff09950ba 100644 (file)
@@ -9,16 +9,10 @@ set(pluginapi_PUBLIC_HEADERS
     aniplayer/playerfeatureplugininterface.h
 )
 
-add_library(pluginapi INTERFACE)
+add_library(pluginapi INTERFACE ${pluginapi_PUBLIC_HEADERS})
 find_package(Qt5 COMPONENTS Core)
-target_link_libraries(pluginapi INTERFACE ${pluginapi_LIBS})
 target_link_libraries(pluginapi INTERFACE Qt5::Core)
 
 install(FILES ${pluginapi_PUBLIC_HEADERS}
     DESTINATION include/aniplayer
 )
-
-# IDE hack
-#project(pluginapi_ide CXX)
-add_custom_target(pluginapi_ide SOURCES ${pluginapi_PUBLIC_HEADERS})
-