blob: a624d03278f3aad8659b9c2adcefd7f124f3acf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -55,18 +55,6 @@ set_target_properties(${APNGASM_DYNAMIC_LIB_TARGET}
CXX_STANDARD 20
)
-# Add the static library/archive
-set(APNGASM_STATIC_LIB_TARGET apngasm-static)
-add_library(${APNGASM_STATIC_LIB_TARGET}
- ${APNGASM_SOURCES}
-)
-set_target_properties(${APNGASM_STATIC_LIB_TARGET}
- PROPERTIES
- POSITION_INDEPENDENT_CODE TRUE
- OUTPUT_NAME apngasm
- CXX_STANDARD 20
-)
-
# Add libraries/includes
#target_link_libraries(${APNGASM_DYNAMIC_LIB_TARGET} stdc++fs)
#target_link_libraries(${APNGASM_STATIC_LIB_TARGET} stdc++fs)
@@ -74,11 +62,9 @@ set_target_properties(${APNGASM_STATIC_LIB_TARGET}
find_package(PNG REQUIRED)
include_directories(${PNG_INCLUDE_DIR})
target_link_libraries(${APNGASM_DYNAMIC_LIB_TARGET} ${PNG_LIBRARY})
-target_link_libraries(${APNGASM_STATIC_LIB_TARGET} ${PNG_LIBRARY})
message(${PNG_VERSION_STRING})
target_link_libraries(${APNGASM_DYNAMIC_LIB_TARGET} ${ZLIB_LIBRARIES})
-target_link_libraries(${APNGASM_STATIC_LIB_TARGET} ${ZLIB_LIBRARIES})
#if (APPLE OR WIN32)
# set(Boost_USE_STATIC_LIBS ON)
@@ -88,13 +74,10 @@ target_link_libraries(${APNGASM_STATIC_LIB_TARGET} ${ZLIB_LIBRARIES})
find_package(Boost REQUIRED COMPONENTS program_options regex system)
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
target_link_libraries(${APNGASM_DYNAMIC_LIB_TARGET} Boost::program_options Boost::regex Boost::system)
-target_link_libraries(${APNGASM_STATIC_LIB_TARGET} Boost::program_options Boost::regex Boost::system)
get_target_property(APNGASM_DYNAMIC_LIB_TARGET_NAME ${APNGASM_DYNAMIC_LIB_TARGET} OUTPUT_NAME)
-get_target_property(APNGASM_STATIC_LIB_TARGET_NAME ${APNGASM_STATIC_LIB_TARGET} OUTPUT_NAME)
set(APNGASM_LIBRARIES
${PROJECT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${APNGASM_DYNAMIC_LIB_TARGET_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
- ${PROJECT_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${APNGASM_STATIC_LIB_TARGET_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
)
# Installation
@@ -107,7 +90,6 @@ endif ()
install(
TARGETS
${APNGASM_DYNAMIC_LIB_TARGET}
- ${APNGASM_STATIC_LIB_TARGET}
DESTINATION ${LIB_INSTALL_DIR}
)
|