Skip to content

Instantly share code, notes, and snippets.

@fire
Last active December 22, 2015 04:19
Show Gist options
  • Save fire/6416474 to your computer and use it in GitHub Desktop.
Save fire/6416474 to your computer and use it in GitHub Desktop.
CMakeList.txt for CZMQ
cmake_minimum_required(VERSION 2.8)
if(COMMAND cmake_policy)
if(POLICY CMP0005)
cmake_policy(SET CMP0005 NEW) # automatic quoting of brackets
endif(POLICY CMP0005)
if(POLICY CMP0011)
# we do want the includer to be affected by our updates,
# since it might define project-global settings.
cmake_policy(SET CMP0011 OLD)
endif(POLICY CMP0011)
if(POLICY CMP0015)
# .vcproj contains relative paths to additional library directories, thus we need to be able to cope with that
cmake_policy(SET CMP0015 NEW)
endif(POLICY CMP0015)
endif(COMMAND cmake_policy)
project( czmq )
set(SOURCES_files_Source_Files
src/zbeacon.c
src/zclock.c
src/zctx.c
src/zfile.c
src/zframe.c
src/zhash.c
src/zlist.c
src/zloop.c
src/zmsg.c
src/zmutex.c
src/zsocket.c
src/zsockopt.c
src/zstr.c
src/zsys.c
src/zthread.c
)
source_group("Source Files" FILES ${SOURCES_files_Source_Files})
set(SOURCES_Source_Files
${SOURCES_files_Source_Files}
)
set(SOURCES_files_Header_Files
include/czmq.h
include/czmq_prelude.h
include/zclock.h
include/zctx.h
include/zfile.h
include/zframe.h
include/zhash.h
include/zlist.h
include/zloop.h
include/zmsg.h
include/zmutex.h
include/zsocket.h
include/zsockopt.h
include/zstr.h
include/zsys.h
include/zthread.h
)
source_group("Header Files" FILES ${SOURCES_files_Header_Files})
set(SOURCES_Header_Files
${SOURCES_files_Header_Files}
)
set(SOURCES_
${SOURCES_Source_Files}
${SOURCES_Header_Files}
)
include_directories(
../libzmq/include
include
)
set_source_files_properties(${SOURCES_Source_Files} PROPERTIES LANGUAGE CXX )
add_library ( czmq ${SOURCES_} )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment