File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,19 +103,11 @@ if (ENABLE_DISCORD_RPC)
103103endif ()
104104
105105if (ENABLE_LIBPNG)
106- if (NOT MSVC )
107- find_package (PNG REQUIRED )
108- endif ()
109106 target_compile_definitions (sawyer PRIVATE CS_ENABLE_LIBPNG )
107+ find_package (PNG REQUIRED )
110108
111- if (MSVC )
112- if (${VCPKG_TARGET_TRIPLET} MATCHES "-static$" )
113- find_package (libpng CONFIG REQUIRED )
114- merge_static_libraries (sawyer $<TARGET_FILE :png_static >)
115- else ()
116- find_package (PNG REQUIRED )
117- target_link_libraries (sawyer PRIVATE PNG::PNG )
118- endif ()
109+ if (TARGET PNG::PNG)
110+ target_link_libraries (sawyer PRIVATE PNG::PNG )
119111 else ()
120112 target_link_libraries (sawyer PRIVATE png )
121113 endif ()
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.15 )
22project (fsaw CXX )
33
4- find_package (sawyer REQUIRED PATHS ../../out/share )
5-
64set (CMAKE_CXX_STANDARD 17)
75
86file (GLOB_RECURSE SAWYER_SOURCES "src/*.cpp" )
@@ -13,6 +11,12 @@ else ()
1311
1412endif ()
1513
14+ # libsawyer
15+ find_package (sawyer REQUIRED PATHS ../../out/share )
16+
17+ # libraries
18+ find_package (PNG REQUIRED )
19+
1620add_executable (fsaw ${SAWYER_SOURCES} )
1721if (${VCPKG_TARGET_TRIPLET} MATCHES "-static$" )
1822 set_property (TARGET fsaw PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG :Debug >:Debug >" )
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.15 )
22project (gxc CXX )
33
4- # libsawyer
5- find_package (sawyer REQUIRED PATHS ../../out/share )
6-
7- # libraries
8- if (MSVC )
9- find_package (libpng CONFIG REQUIRED )
10- endif ()
11- find_package (nlohmann_json CONFIG REQUIRED )
12-
134set (CMAKE_CXX_STANDARD 17)
145
156file (GLOB_RECURSE SAWYER_SOURCES "src/*.cpp" )
@@ -23,6 +14,13 @@ else ()
2314 endif ()
2415endif ()
2516
17+ # libsawyer
18+ find_package (sawyer REQUIRED PATHS ../../out/share )
19+
20+ # libraries
21+ find_package (nlohmann_json CONFIG REQUIRED )
22+ find_package (PNG REQUIRED )
23+
2624add_executable (gxc ${SAWYER_SOURCES} )
2725if (${VCPKG_TARGET_TRIPLET} MATCHES "-static$" )
2826 set_property (TARGET gxc PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG :Debug >:Debug >" )
You can’t perform that action at this time.
0 commit comments