cmake: set explicit headers (replace file glob antipattern)
@@ -156,7 +156,63 @@ add_definitions(
# Source/Header section
#
-file(GLOB RE_INCLUDE_FILES "include/*.h")
+set(HEADERS
+ include/re_aes.h
+ include/re_atomic.h
+ include/re_base64.h
+ include/re_bfcp.h
+ include/re_bitv.h
+ include/re_btrace.h
+ include/re_conf.h
+ include/re_convert.h
+ include/re_crc32.h
+ include/re_dbg.h
+ include/re_dns.h
+ include/re_fmt.h
+ include/re.h
+ include/re_hash.h
+ include/re_hmac.h
+ include/re_httpauth.h
+ include/re_http.h
+ include/re_ice.h
+ include/re_jbuf.h
+ include/re_json.h
+ include/re_list.h
+ include/re_lock.h
+ include/re_main.h
+ include/re_mbuf.h
+ include/re_md5.h
+ include/re_mem.h
+ include/re_mod.h
+ include/re_mqueue.h
+ include/re_msg.h
+ include/re_net.h
+ include/re_odict.h
+ include/re_rtmp.h
+ include/re_rtp.h
+ include/re_sa.h
+ include/re_sdp.h
+ include/re_sha.h
+ include/re_shim.h
+ include/re_sipevent.h
+ include/re_sip.h
+ include/re_sipreg.h
+ include/re_sipsess.h
+ include/re_srtp.h
+ include/re_stun.h
+ include/re_sys.h
+ include/re_tcp.h
+ include/re_telev.h
+ include/re_tls.h
+ include/re_tmr.h
+ include/re_trace.h
+ include/re_trice.h
+ include/re_turn.h
+ include/re_types.h
+ include/re_udp.h
+ include/re_uri.h
+ include/re_websock.h
+)
set(SRCS
@@ -470,7 +526,7 @@ endif()
# Main target object
#
-add_library(re-objs OBJECT ${SRCS})
+add_library(re-objs OBJECT ${SRCS} ${HEADERS})
set_target_properties(re-objs PROPERTIES POSITION_INDEPENDENT_CODE ON)
@@ -531,7 +587,7 @@ target_link_libraries(re
PRIVATE -L/opt/local/lib
)
-set_target_properties(re PROPERTIES PUBLIC_HEADER "${RE_INCLUDE_FILES}")
+set_target_properties(re PROPERTIES PUBLIC_HEADER "${HEADERS}")
if(MSVC)
set_target_properties(re PROPERTIES OUTPUT_NAME "re-static")
