
SET(CERTI_TYPES1516_SRCS
    HLAbuffer.hh HLAbuffer.cc
)
 
SOURCE_GROUP("Source Files\\Types1516" FILES ${CERTI_TYPES1516_SRCS})

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

# ISO C++ does not support 'long long', but HLAtypesIEEE1516.hh needs it
IF(CMAKE_COMPILER_IS_GNUCC)
    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_COMPILER_IS_GNUCXX)
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-long")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

ADD_LIBRARY(HLA
    ${CERTI_TYPES1516_SRCS}
)

SET_TARGET_PROPERTIES(HLA PROPERTIES PROJECT_LABEL LibHLA)
                        
SET_TARGET_PROPERTIES(HLA PROPERTIES VERSION 1.0.0 SOVERSION 1)

SET(TestHLAtypes_SRCS
  TestHLAtypes.cc
)

ADD_EXECUTABLE(TestHLAtypes ${TestHLAtypes_SRCS})

TARGET_LINK_LIBRARIES(TestHLAtypes HLA)

ADD_TEST(HLAtypes TestHLAtypes)

INSTALL(FILES
    HLAtypesIEEE1516.hh
    HLAbuffer.hh
    HLAbasicType.hh
    HLAenumeratedType.hh
    HLAfixedArray.hh
    HLAvariableArray.hh
    HLAfixedRecord.hh
    HLAvariantRecord.hh
    DESTINATION include)

INSTALL(PROGRAMS
    hlaomtdif2cpp.py
    DESTINATION bin)

INSTALL(TARGETS HLA
    RUNTIME DESTINATION bin
    LIBRARY DESTINATION lib
    ARCHIVE DESTINATION lib)
