how can i create osl project with CMake?

191 views
Skip to first unread message

amin khormaei

unread,
Apr 19, 2020, 12:29:43 AM4/19/20
to OSL Developers
is there a guide to make osl project with CMake?

when I wanted to create the project I got these errors:


CMake Error at CMakeLists.txt:122 (include):
  include could
not find load file:

    colors


CMake Error at CMakeLists.txt:123 (include):
  include could
not find load file:

    check_is_enabled


CMake Error at CMakeLists.txt:126 (include):
  include could
not find load file:

    compiler


CMake Error at CMakeLists.txt:128 (include):
  include could
not find load file:

    externalpackages


CMake Error at CMakeLists.txt:129 (include):
  include could
not find load file:

    flexbison


CMake Error at CMakeLists.txt:130 (include):
  include could
not find load file:

    cuda_macros


CMake Error at CMakeLists.txt:146 (add_subdirectory):
  add_subdirectory given source
"src/include" which is not an existing
  directory
.


CMake Error at CMakeLists.txt:147 (add_subdirectory):
  add_subdirectory given source
"src/liboslcomp" which is not an existing
  directory
.


CMake Error at CMakeLists.txt:148 (add_subdirectory):
  add_subdirectory given source
"src/liboslquery" which is not an existing
  directory
.


CMake Error at CMakeLists.txt:149 (add_subdirectory):
  add_subdirectory given source
"src/liboslexec" which is not an existing
  directory
.


CMake Error at CMakeLists.txt:150 (add_subdirectory):
  add_subdirectory given source
"src/liboslnoise" which is not an existing
  directory
.


CMake Error at CMakeLists.txt:151 (add_subdirectory):
  add_subdirectory given source
"src/oslc" which is not an existing
  directory
.


CMake Error at CMakeLists.txt:152 (add_subdirectory):
  add_subdirectory given source
"src/oslinfo" which is not an existing
  directory
.


CMake Error at CMakeLists.txt:155 (add_subdirectory):
  add_subdirectory given source
"src/testshade" which is not an existing
  directory
.


CMake Error at CMakeLists.txt:156 (add_subdirectory):
  add_subdirectory given source
"src/testrender" which is not an existing
  directory
.


CMake Error at CMakeLists.txt:160 (add_subdirectory):
  add_subdirectory given source
"src/osl.imageio" which is not an existing
  directory
.


CMake Error at CMakeLists.txt:168 (add_subdirectory):
  add_subdirectory given source
"src/shaders" which is not an existing
  directory
.


CMake Error at CMakeLists.txt:176 (add_subdirectory):
  add_subdirectory given source
"src/doc" which is not an existing directory.


CMake Error at CMakeLists.txt:221 (export):
 
export Export set "OSL_EXPORTED_TARGETS" not found.


CMake Error: File M:/OSL/OSL_Project/src/cmake/Config.cmake.in does not exist.
CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/CMakePackageConfigHelpers.cmake:330 (configure_file):
  configure_file
Problem configuring file
Call Stack (most recent call first):
 
CMakeLists.txt:224 (configure_package_config_file)


CMake Error at CMakeLists.txt:248 (file):
  file COPY cannot find
"M:/OSL/OSL_Project/testsuite/common": File exists.


CMake Error at CMakeLists.txt:497 (file):
  file COPY cannot find
"M:/OSL/OSL_Project/LICENSE": File exists.


CMake Error at CMakeLists.txt:498 (file):
  file RENAME failed to rename

    M
:/OSL/OSL_Project/build/LICENSE

  to

    M
:/OSL/OSL_Project/build/License.txt

  because
: File exists



CMake Error at CMakeLists.txt:500 (file):
  file COPY cannot find
"M:/OSL/OSL_Project/README.md": File exists.


CMake Error at CMakeLists.txt:501 (file):
  file RENAME failed to rename

    M
:/OSL/OSL_Project/build/README.md

  to

    M
:/OSL/OSL_Project/build/Readme.txt

  because
: File exists



CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/CPack.cmake:540 (message):
 
CPack package description file:
 
"M:/OSL/OSL_Project/src/doc/Description.txt" could not be found.
Call Stack (most recent call first):
  C
:/Program Files/CMake/share/cmake-3.16/Modules/CPack.cmake:544 (cpack_check_file_exists)
 
CMakeLists.txt:517 (include)


CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/CPack.cmake:540 (message):
 
CPack license resource file: "M:/OSL/OSL_Project/build/License.txt" could
 
not be found.
Call Stack (most recent call first):
  C
:/Program Files/CMake/share/cmake-3.16/Modules/CPack.cmake:545 (cpack_check_file_exists)
 
CMakeLists.txt:517 (include)


CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/CPack.cmake:540 (message):
 
CPack readme resource file: "M:/OSL/OSL_Project/build/Readme.txt" could not
  be found
.
Call Stack (most recent call first):
  C
:/Program Files/CMake/share/cmake-3.16/Modules/CPack.cmake:546 (cpack_check_file_exists)
 
CMakeLists.txt:517 (include)


CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/CPack.cmake:540 (message):
 
CPack welcome resource file: "M:/OSL/OSL_Project/src/doc/Welcome.txt" could
 
not be found.
Call Stack (most recent call first):
  C
:/Program Files/CMake/share/cmake-3.16/Modules/CPack.cmake:547 (cpack_check_file_exists)
 
CMakeLists.txt:517 (include)




OSL: 1.11
CMake: 3.16.4
visual studio community : 2019

Larry Gritz

unread,
Apr 19, 2020, 12:32:34 AM4/19/20
to OSL Developers List
I suspect you're doing something odd.

Can you tell us exactly what command you used to run cmake?


--
You received this message because you are subscribed to the Google Groups "OSL Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osl-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osl-dev/3e83a7eb-39f5-4d93-bf24-8f448bc1bd37%40googlegroups.com.

--
Larry Gritz




amin khormaei

unread,
Apr 19, 2020, 2:49:40 AM4/19/20
to OSL Developers
let me explain what i did after this error:
 
i used CMake GUI .

int the cmake gui , for the source code i chose the path of unzipped file that include the CMakeLists.txt
for build binaries i created a build folder inside that unzipped floder

Capture.PNG

Capture1.PNG


when i click the config file i get a new error as you can see in the below image


Capture3.PNG


CMake Error at src/cmake/externalpackages.cmake:142 (message):
 
[31mBoost is required, aborting. [m
Call Stack (most recent call first):

 src
/cmake/externalpackages.cmake:183 (checked_find_package)
 
CMakeLists.txt:128 (include)

Message has been deleted

Larry Gritz

unread,
Apr 19, 2020, 3:27:44 AM4/19/20
to OSL Developers List
Yes, the error messages in the screen shots do spell out the problem:  you are missing boost, which is a required dependency.

As seen here from your post:


Capture3.PNG

On Apr 18, 2020, at 11:49 PM, amin khormaei <amin.k...@gmail.com> wrote:

let me explain what i did after this error:
 
i used CMake GUI .

int the cmake gui , for the source code i chose the path of unzipped file that include the CMakeLists.txt
for build binaries i created a build folder inside that unzipped floder

<Capture.PNG>

<Capture1.PNG>


when i click the config file i get a new error as you can see in the below image


<Capture3.PNG>


CMake Error at src/cmake/externalpackages.cmake:142 (message):
 
[31mBoost is required, aborting. [m
Call Stack (most recent call first):
 src
/cmake/externalpackages.cmake:183 (checked_find_package)
 
CMakeLists.txt:128 (include)

--
You received this message because you are subscribed to the Google Groups "OSL Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osl-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osl-dev/26f03af8-7103-4c39-a3db-d49661caa2d7%40googlegroups.com.
<Capture.PNG><Capture1.PNG><Capture3.PNG>

--
Larry Gritz




amin khormaei

unread,
Apr 19, 2020, 3:32:43 AM4/19/20
to OSL Developers
how can i solve that?

Larry Gritz

unread,
Apr 19, 2020, 3:33:52 AM4/19/20
to OSL Developers List
Install boost before you try to build OSL.


On Apr 19, 2020, at 12:32 AM, amin khormaei <amin.k...@gmail.com> wrote:

how can i solve that?


--
Larry Gritz




amin khormaei

unread,
Apr 19, 2020, 3:47:09 AM4/19/20
to OSL Developers
--
Larry Gritz


you mean the boost library?

amin khormaei

unread,
Apr 19, 2020, 3:59:16 AM4/19/20
to OSL Developers
oh my god , i was reading the language specification pdf and i encountered your name , you are the original designer and project leader of OSL
what a great man . thank you for your helping

Larry Gritz

unread,
Apr 19, 2020, 11:01:06 AM4/19/20
to amin khormaei, OSL Developers
Yes, the boost library.
--
Larry Gritz
l...@larrygritz.com
Reply all
Reply to author
Forward
0 new messages