Browse Source

remove some aggression :)

configuration
Lennart Weller 9 years ago
parent
commit
da505768f0
2 changed files with 25 additions and 25 deletions
  1. +6
    -6
      CMakeLists.txt
  2. +19
    -19
      src/CMakeLists.txt

+ 6
- 6
CMakeLists.txt View File

@ -1,10 +1,10 @@
#Configure to your liking
SET(CMAKE_C_COMPILER clang)
SET(CMAKE_BUILD_TYPE DEBUG)
set(CMAKE_C_COMPILER clang)
set(CMAKE_BUILD_TYPE DEBUG)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(gogdownloader)
cmake_minimum_required(VERSION 2.6)
project(gogdownloader)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake/)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake/)
ADD_SUBDIRECTORY(src)
add_subdirectory(src)

+ 19
- 19
src/CMakeLists.txt View File

@ -1,32 +1,32 @@
FIND_PACKAGE(ProtobufC REQUIRED)
FIND_PACKAGE(CURL REQUIRED)
FIND_PACKAGE(JSON REQUIRED)
FIND_PACKAGE(OAuth REQUIRED)
find_package(ProtobufC REQUIRED)
find_package(CURL REQUIRED)
find_package(JSON REQUIRED)
find_package(OAuth REQUIRED)
INCLUDE_DIRECTORIES(${PROTOBUFC_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} ${LIBJSON_INCLUDE_DIRS} ${LIBOAUTH_INCLUDE_DIRS})
SET(LIBS ${LIBS} ${PROTOBUFC_LIBRARIES} ${LIBJSON_LIBRARIES} ${LIBOAUTH_LIBRARIES} ${CURL_LIBRARIES})
include_directories(${PROTOBUFC_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} ${LIBJSON_INCLUDE_DIRS} ${LIBOAUTH_INCLUDE_DIRS})
set(LIBS ${LIBS} ${PROTOBUFC_LIBRARIES} ${LIBJSON_LIBRARIES} ${LIBOAUTH_LIBRARIES} ${CURL_LIBRARIES})
ADD_DEFINITIONS(-std=c99)
add_definitions(-std=c99)
IF(USERNAME AND PASSWORD)
SET(goglogin_USERNAME ${USERNAME})
SET(goglogin_PASSWORD ${PASSWORD})
ELSE(USERNAME AND PASSWORD)
MESSAGE(SEND_ERROR "USERNAME and PASSWORD not defined")
ENDIF(USERNAME AND PASSWORD)
if(USERNAME AND PASSWORD)
set(goglogin_USERNAME ${USERNAME})
set(goglogin_PASSWORD ${PASSWORD})
else(USERNAME AND PASSWORD)
message(SEND_ERROR "USERNAME and PASSWORD not defined")
endif(USERNAME AND PASSWORD)
configure_file ("token.h.in" "token.h")
SET(GOG_SRC gog.h
set(GOG_SRC gog.h
main.c
api.c
http.c
util.c
serialization.c
)
PROTOC(PROTO_SRC state.proto)
ADD_EXECUTABLE(goglogin ${GOG_SRC} ${PROTO_SRC})
TARGET_LINK_LIBRARIES(goglogin ${LIBS})
protoc(PROTO_SRC state.proto)
add_executable(goglogin ${GOG_SRC} ${PROTO_SRC})
target_link_libraries(goglogin ${LIBS})
INSTALL(TARGETS goglogin DESTINATION bin)
INSTALL(FILES gog.h DESTINATION include)
install(TARGETS goglogin DESTINATION bin)
install(FILES gog.h DESTINATION include)

Loading…
Cancel
Save