aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2021-07-28 23:05:28 +0200
committerJan200101 <sentrycraft123@gmail.com>2021-07-28 23:05:28 +0200
commit36fdad1f1f90f1efb173632de693edb486c5b2b0 (patch)
treedce2175246ee493e7b53433377586df3bb9b29e6
parentb935a8c61e1001d0190175a1e2c8e98942de64b5 (diff)
downloadpolecat-36fdad1f1f90f1efb173632de693edb486c5b2b0.tar.gz
polecat-36fdad1f1f90f1efb173632de693edb486c5b2b0.zip
find packages before setting CFLAGS
we cannot set package specific CFLAGS if we don't know them
-rw-r--r--src/CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 85743d9..2069d5a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -34,6 +34,10 @@ set(MAINSOURCES
)
endif()
+find_package(Libcurl REQUIRED)
+find_package(JsonC REQUIRED)
+find_package(Libarchive REQUIRED)
+
set(CFLAGS
-Wall -Wextra -pedantic
-Wconversion -Wshadow -Wstrict-aliasing
@@ -45,10 +49,6 @@ set(CFLAGS
${LIBCURL_CFLAGS}
)
-find_package(Libcurl REQUIRED)
-find_package(JsonC REQUIRED)
-find_package(Libarchive REQUIRED)
-
add_library(${CMAKE_PROJECT_NAME}core STATIC ${LIBSOURCES})
add_executable(${CMAKE_PROJECT_NAME} ${MAINSOURCES})