Changeset cb001a0b in OpenModelica


Ignore:
Timestamp:
2020-10-21T14:04:17+02:00 (4 years ago)
Author:
Mahder Gebremedhin <mahder.gebremedhin@…>
Children:
1e4d18b
Parents:
c4208ad
git-author:
Mahder Gebremedhin <mahder.gebremedhin@…> (09/16/20 16:57:45)
git-committer:
Mahder Gebremedhin <mahder.gebremedhin@…> (10/21/20 14:04:17)
Message:

[cmake] A quick fix for uuid linkage.

  • On Windows uuid.lib is added to every exe or dll linkage by cmake.
  • On other systems we need to link it explicitly.
  • There is no cmake module for finding uuid yet. I will add one later but for now jsut find_library should suffice assuming that the uuid headers will be in the system include directories.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/Compiler/runtime/CMakeLists.txt

    r965cc7b7 rcb001a0b  
    55find_package(LAPACK REQUIRED)
    66# find_package(ZLIB REQUIRED) # Not needed. We use the minizip lib from 3rdParty/FMIL instead
     7
     8
     9# On Win32 we use system UUID lib which is one of the default libs that cmake adds to any target on Win32.
     10# On non Win32 systems we need to link explicitly to uuid. However,
     11# there is no FindUUID yet. We can add one later.
     12# Instead we use find library for now. It should be okay for now since I am guessing uuid headers
     13# should be in the default include dirs anyway.
     14if(NOT WIN32)
     15    find_library(uuid REQUIRED)
     16endif()
     17
    718
    819
     
    6273target_link_libraries(omcruntime PUBLIC omc::3rd::FMIL::minizip) # We use the minizip lib from 3rdParty/FMIL
    6374
     75# uuid is one of the default libs that cmake adds to any target on Win32.
     76# On non-Win systems we look for the library and explicitly use it.
     77if(NOT WIN32)
     78    target_link_libraries(omcruntime PUBLIC uuid)
     79endif()
     80
    6481if(OMC_USE_CORBA AND MINGW)
    6582    target_link_libraries(omcruntime PUBLIC omdev::omniORB::omniORB420_rt)
Note: See TracChangeset for help on using the changeset viewer.